aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-10-17 20:46:12 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-10-17 20:46:12 +0800
commit4feea7a284471312f7c9e4c9bfc1502fe0813b04 (patch)
treecbfb50757407aa1ea7a60fff5d80239e9b184963
parent2b48c0d281784a49a1919f326b0a306928344455 (diff)
downloadgsoc2013-empathy-4feea7a284471312f7c9e4c9bfc1502fe0813b04.tar
gsoc2013-empathy-4feea7a284471312f7c9e4c9bfc1502fe0813b04.tar.gz
gsoc2013-empathy-4feea7a284471312f7c9e4c9bfc1502fe0813b04.tar.bz2
gsoc2013-empathy-4feea7a284471312f7c9e4c9bfc1502fe0813b04.tar.lz
gsoc2013-empathy-4feea7a284471312f7c9e4c9bfc1502fe0813b04.tar.xz
gsoc2013-empathy-4feea7a284471312f7c9e4c9bfc1502fe0813b04.tar.zst
gsoc2013-empathy-4feea7a284471312f7c9e4c9bfc1502fe0813b04.zip
Name imported accounts in the same way as a new account does. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1601
-rw-r--r--src/empathy-import-dialog.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/empathy-import-dialog.c b/src/empathy-import-dialog.c
index aa9169acf..f9d34603a 100644
--- a/src/empathy-import-dialog.c
+++ b/src/empathy-import-dialog.c
@@ -143,12 +143,12 @@ empathy_import_dialog_add_account (gchar *protocol_name,
{
McProfile *profile;
McAccount *account;
- const gchar *unique_name;
gchar *key_char;
GHashTableIter iter;
gpointer key, value;
EmpathyImportSetting *set;
-
+ gchar *display_name;
+ gchar *username;
DEBUG ("Looking up profile with protocol '%s'", protocol_name);
profile = mc_profile_lookup (protocol_name);
@@ -158,9 +158,6 @@ empathy_import_dialog_add_account (gchar *protocol_name,
account = mc_account_create (profile);
- unique_name = mc_account_get_unique_name (account);
- mc_account_set_display_name (account, unique_name);
-
g_hash_table_iter_init (&iter, settings);
while (g_hash_table_iter_next (&iter, &key, &value))
{
@@ -190,6 +187,14 @@ empathy_import_dialog_add_account (gchar *protocol_name,
break;
}
}
+
+ mc_account_get_param_string (account, "account", &username);
+ display_name = g_strdup_printf ("%s (%s)", username,
+ mc_profile_get_display_name (profile));
+ mc_account_set_display_name (account, display_name);
+
+ g_free (username);
+ g_free (display_name);
g_object_unref (account);
g_object_unref (profile);
return TRUE;