diff options
author | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-10-17 20:46:12 +0800 |
---|---|---|
committer | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-10-17 20:46:12 +0800 |
commit | 03bab28166c7481c98dce79126837b790c81072a (patch) | |
tree | cbfb50757407aa1ea7a60fff5d80239e9b184963 /src | |
parent | abaa43674dd3416ec28ad20640aff9504a2f45d0 (diff) | |
download | gsoc2013-empathy-03bab28166c7481c98dce79126837b790c81072a.tar gsoc2013-empathy-03bab28166c7481c98dce79126837b790c81072a.tar.gz gsoc2013-empathy-03bab28166c7481c98dce79126837b790c81072a.tar.bz2 gsoc2013-empathy-03bab28166c7481c98dce79126837b790c81072a.tar.lz gsoc2013-empathy-03bab28166c7481c98dce79126837b790c81072a.tar.xz gsoc2013-empathy-03bab28166c7481c98dce79126837b790c81072a.tar.zst gsoc2013-empathy-03bab28166c7481c98dce79126837b790c81072a.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>
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1601 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-import-dialog.c | 15 |
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; |