summaryrefslogtreecommitdiff
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-09-30 10:32:15 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-07 14:06:06 +0100
commit43070f934f712124c9b064c34021f42e09eb328e (patch)
treef5ac8c789eb72d5903a88981e054ed57f1a77c43 /libempathy-gtk
parent598db544a4d66a00aa45c036eb5bd6f591f0f996 (diff)
account_widget_get_service: check Service for Facebook and GTalk too
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index af112477e..f33fec2c0 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -1327,17 +1327,22 @@ static Service
account_widget_get_service (EmpathyAccountWidget *self)
{
EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+ const gchar *icon_name, *service;
- if (!tp_strdiff (empathy_account_settings_get_icon_name (priv->settings),
- "im-google-talk"))
+ icon_name = empathy_account_settings_get_icon_name (priv->settings);
+ service = empathy_account_settings_get_service (priv->settings);
+
+ /* Previous versions of Empathy didn't set the Service property on Facebook
+ * and gtalk accounts, so we check using the icon name as well. */
+ if (!tp_strdiff (icon_name, "im-google-talk") ||
+ !tp_strdiff (service, "google-talk"))
return GTALK_SERVICE;
- if (!tp_strdiff (empathy_account_settings_get_icon_name (priv->settings),
- "im-facebook"))
+ if (!tp_strdiff (icon_name, "im-facebook") ||
+ !tp_strdiff (service, "facebook"))
return FACEBOOK_SERVICE;
- if (!tp_strdiff (empathy_account_settings_get_service (priv->settings),
- "ovi-chat"))
+ if (!tp_strdiff (service, "ovi-chat"))
return OVI_SERVICE;
return NO_SERVICE;