aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-08-25 21:40:46 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-25 22:06:14 +0800
commitf36e15d51645589811bb5ed1d973ec49d534e7eb (patch)
tree3ee40f695331b2c8bca02e68f4c162ad1b1d9bb0 /src
parentd3ab5e2272f7fa5f20657c386cdc1cc80880e1ed (diff)
downloadgsoc2013-empathy-f36e15d51645589811bb5ed1d973ec49d534e7eb.tar
gsoc2013-empathy-f36e15d51645589811bb5ed1d973ec49d534e7eb.tar.gz
gsoc2013-empathy-f36e15d51645589811bb5ed1d973ec49d534e7eb.tar.bz2
gsoc2013-empathy-f36e15d51645589811bb5ed1d973ec49d534e7eb.tar.lz
gsoc2013-empathy-f36e15d51645589811bb5ed1d973ec49d534e7eb.tar.xz
gsoc2013-empathy-f36e15d51645589811bb5ed1d973ec49d534e7eb.tar.zst
gsoc2013-empathy-f36e15d51645589811bb5ed1d973ec49d534e7eb.zip
Don't display 'null' in accounts UI for unknown protocols
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 982ebe7bf..6fa484924 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1081,19 +1081,24 @@ accounts_dialog_button_create_clicked_cb (GtkWidget *button,
EmpathyAccountsDialog *dialog)
{
EmpathyAccountSettings *settings;
- gchar *str;
+ gchar *str;
+ const gchar *display_name;
TpConnectionManager *cm;
TpConnectionManagerProtocol *proto;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
cm = empathy_protocol_chooser_dup_selected (
EMPATHY_PROTOCOL_CHOOSER (priv->combobox_protocol), &proto);
+ display_name = empathy_protocol_name_to_display_name (proto->name);
- /* Create account */
- /* To translator: %s is the protocol name */
- str = g_strdup_printf (_("New %s account"),
- empathy_protocol_name_to_display_name (proto->name));
+ if (display_name == NULL)
+ display_name = proto->name;
+ /* Create account */
+ /* To translator: %s is the name of the protocol, such as "Google Talk" or
+ * "Yahoo!
+ */
+ str = g_strdup_printf (_("New %s account"), display_name);
settings = empathy_account_settings_new (cm->name, proto->name, str);
g_free (str);