[empathy] account_widget_get_service: check Service for Facebook and GTalk too
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] account_widget_get_service: check Service for Facebook and GTalk too
- Date: Tue, 7 Dec 2010 13:06:45 +0000 (UTC)
commit 43070f934f712124c9b064c34021f42e09eb328e
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Sep 30 10:32:15 2010 +0200
account_widget_get_service: check Service for Facebook and GTalk too
libempathy-gtk/empathy-account-widget.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index af11247..f33fec2 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]