diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-17 21:35:07 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-29 18:54:37 +0800 |
commit | fc4059e17da2a94a3864f396b5de12d93865090d (patch) | |
tree | b7e51c0ece0074708d6762786c88730c8cf20e6f /src/empathy-accounts-dialog.c | |
parent | 3a6aca03ec70cb11d23cfd68e72a51a4a49220a2 (diff) | |
download | gsoc2013-empathy-fc4059e17da2a94a3864f396b5de12d93865090d.tar gsoc2013-empathy-fc4059e17da2a94a3864f396b5de12d93865090d.tar.gz gsoc2013-empathy-fc4059e17da2a94a3864f396b5de12d93865090d.tar.bz2 gsoc2013-empathy-fc4059e17da2a94a3864f396b5de12d93865090d.tar.lz gsoc2013-empathy-fc4059e17da2a94a3864f396b5de12d93865090d.tar.xz gsoc2013-empathy-fc4059e17da2a94a3864f396b5de12d93865090d.tar.zst gsoc2013-empathy-fc4059e17da2a94a3864f396b5de12d93865090d.zip |
Add empathy_service_name_to_display_name()
Also makes empathy_protocol_name_to_display_name() fallbacks to the protocol
name so caller doesn't have to.
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r-- | src/empathy-accounts-dialog.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index a8339a58b..fd6821368 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -585,7 +585,7 @@ accounts_dialog_setup_ui_to_add_account (EmpathyAccountsDialog *dialog) EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); EmpathyAccountSettings *settings; gchar *str; - const gchar *name, *display_name; + const gchar *display_name; TpConnectionManager *cm; TpConnectionManagerProtocol *proto; gboolean is_gtalk = FALSE, is_facebook = FALSE; @@ -599,22 +599,16 @@ accounts_dialog_setup_ui_to_add_account (EmpathyAccountsDialog *dialog) if (!tp_strdiff (service, "google-talk")) { is_gtalk = TRUE; - name = "gtalk"; } else if (!tp_strdiff (service, "facebook")) { is_facebook = TRUE; - name ="facebook"; - } - else - { - name = proto->name; } - /* TODO: pass the service name to empathy_protocol_name_to_display_name */ - display_name = empathy_protocol_name_to_display_name (name); - if (display_name == NULL) - display_name = proto->name; + if (service != NULL) + display_name = empathy_service_name_to_display_name (service); + else + display_name = empathy_protocol_name_to_display_name (proto->name); /* Create account */ /* To translator: %s is the name of the protocol, such as "Google Talk" or |