aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-account-assistant.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-09-17 21:35:07 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-09-29 18:54:37 +0800
commitfc4059e17da2a94a3864f396b5de12d93865090d (patch)
treeb7e51c0ece0074708d6762786c88730c8cf20e6f /src/empathy-account-assistant.c
parent3a6aca03ec70cb11d23cfd68e72a51a4a49220a2 (diff)
downloadgsoc2013-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-account-assistant.c')
-rw-r--r--src/empathy-account-assistant.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 2a350e982..046e2377e 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -389,8 +389,8 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser,
GtkWidget *account_widget;
EmpathyAccountWidget *widget_object = NULL;
gboolean is_gtalk = FALSE, is_facebook = FALSE;
- const gchar *name;
gchar *service;
+ const gchar *display_name;
priv = GET_PRIV (self);
@@ -405,21 +405,19 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser,
if (!tp_strdiff (service, "google-talk"))
{
is_gtalk = TRUE;
- name = "gtalk";
}
else if (!tp_strdiff (service, "facebook"))
{
is_facebook = TRUE;
- name ="facebook";
}
+
+ if (service != NULL)
+ display_name = empathy_service_name_to_display_name (service);
else
- {
- name = proto->name;
- }
+ display_name = empathy_protocol_name_to_display_name (proto->name);
/* To translator: %s is the protocol name */
- str = g_strdup_printf (_("New %s account"),
- empathy_protocol_name_to_display_name (name));
+ str = g_strdup_printf (_("New %s account"), display_name);
settings = empathy_account_settings_new (cm->name, proto->name, str);