From 43070f934f712124c9b064c34021f42e09eb328e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 30 Sep 2010 10:32:15 +0200 Subject: account_widget_get_service: check Service for Facebook and GTalk too --- libempathy-gtk/empathy-account-widget.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'libempathy-gtk') 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; -- cgit v1.2.3