diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-30 16:25:19 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-12-07 21:06:06 +0800 |
commit | 378fff47b595c21f802c0de3944cb520981a992d (patch) | |
tree | c920491080069d286ededcd5cc0f110e63036fe8 | |
parent | 0087a5bd8ddd99a16288bd74a5e23da41c0d8dd1 (diff) | |
download | gsoc2013-empathy-378fff47b595c21f802c0de3944cb520981a992d.tar gsoc2013-empathy-378fff47b595c21f802c0de3944cb520981a992d.tar.gz gsoc2013-empathy-378fff47b595c21f802c0de3944cb520981a992d.tar.bz2 gsoc2013-empathy-378fff47b595c21f802c0de3944cb520981a992d.tar.lz gsoc2013-empathy-378fff47b595c21f802c0de3944cb520981a992d.tar.xz gsoc2013-empathy-378fff47b595c21f802c0de3944cb520981a992d.tar.zst gsoc2013-empathy-378fff47b595c21f802c0de3944cb520981a992d.zip |
more use of account_widget_get_service()
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 25a2e6ff2..9bc4f4bdf 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1251,33 +1251,6 @@ account_widget_build_msn (EmpathyAccountWidget *self, } } -static gboolean -account_widget_is_gtalk (EmpathyAccountWidget *self) -{ - EmpathyAccountWidgetPriv *priv = GET_PRIV (self); - - return !tp_strdiff (empathy_account_settings_get_icon_name (priv->settings), - "im-google-talk"); -} - -static gboolean -account_widget_is_facebook (EmpathyAccountWidget *self) -{ - EmpathyAccountWidgetPriv *priv = GET_PRIV (self); - - return !tp_strdiff (empathy_account_settings_get_icon_name (priv->settings), - "im-facebook"); -} - -static gboolean -account_widget_is_ovi (EmpathyAccountWidget *self) -{ - EmpathyAccountWidgetPriv *priv = GET_PRIV (self); - - return !tp_strdiff (empathy_account_settings_get_service (priv->settings), - "ovi-chat"); -} - static void suffix_id_widget_changed_cb (GtkWidget *entry, EmpathyAccountWidget *self) @@ -2015,8 +1988,7 @@ add_register_buttons (EmpathyAccountWidget *self, if (!tp_connection_manager_protocol_can_register (protocol)) return; - if (account_widget_is_gtalk (self) || account_widget_is_facebook (self) || - account_widget_is_ovi (self)) + if (account_widget_get_service (self) != NO_SERVICE) return; if (priv->simple) @@ -2415,9 +2387,11 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self) const gchar *login_id; const gchar *protocol, *p; gchar *default_display_name; + Service service; login_id = empathy_account_settings_get_string (priv->settings, "account"); protocol = empathy_account_settings_get_protocol (priv->settings); + service = account_widget_get_service (self); if (login_id != NULL) { @@ -2438,7 +2412,7 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self) default_display_name = g_strdup_printf (_("%1$s on %2$s"), login_id, empathy_irc_network_get_name (network)); } - else if (account_widget_is_facebook (self)) + else if (service == FACEBOOK_SERVICE) { gchar *tmp; |