From: Xavier Claessens Date: Thu, 7 Feb 2008 21:14:44 +0000 (+0000) Subject: Move nickname to the main section of account setting UI and do not set automatically... X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=2874061814236e2f0c671ae7558a0172dd34b621 Move nickname to the main section of account setting UI and do not set automatically published name when creating new salut account. Fixes bug #515010 and #515008 (Marco Barisione). svn path=/trunk/; revision=605 --- diff --git a/libempathy-gtk/empathy-account-widget-salut.glade b/libempathy-gtk/empathy-account-widget-salut.glade index 14ede695..ab725c6f 100644 --- a/libempathy-gtk/empathy-account-widget-salut.glade +++ b/libempathy-gtk/empathy-account-widget-salut.glade @@ -28,7 +28,7 @@ True - 2 + 3 3 False 6 @@ -92,6 +92,35 @@ + + + True + _Nickname: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_nickname + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + True @@ -133,6 +162,28 @@ + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 3 + 2 + 3 + + + + 0 @@ -151,7 +202,7 @@ True - 4 + 3 3 False 6 @@ -179,8 +230,8 @@ 0 1 - 2 - 3 + 1 + 2 fill @@ -208,8 +259,8 @@ 0 1 - 3 - 4 + 2 + 3 fill @@ -230,8 +281,8 @@ 1 3 - 2 - 3 + 1 + 2 @@ -251,37 +302,8 @@ 1 3 - 3 - 4 - - - - - - - True - _Nickname: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - entry_nickname - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill + 2 + 3 @@ -308,30 +330,9 @@ 0 1 - 1 - 2 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 3 0 1 + fill @@ -351,8 +352,8 @@ 1 3 - 1 - 2 + 0 + 1 diff --git a/src/empathy.c b/src/empathy.c index a4a90e2c..5f76ecc0 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -100,7 +100,6 @@ create_salut_account (void) EBook *book; EContact *contact; gchar *nickname = NULL; - gchar *published_name = NULL; gchar *first_name = NULL; gchar *last_name = NULL; gchar *email = NULL; @@ -152,39 +151,31 @@ create_salut_account (void) mc_account_set_display_name (account, _("People nearby")); nickname = e_contact_get (contact, E_CONTACT_NICKNAME); - published_name = e_contact_get (contact, E_CONTACT_FULL_NAME); first_name = e_contact_get (contact, E_CONTACT_GIVEN_NAME); last_name = e_contact_get (contact, E_CONTACT_FAMILY_NAME); email = e_contact_get (contact, E_CONTACT_EMAIL_1); jid = e_contact_get (contact, E_CONTACT_IM_JABBER_HOME_1); - if (G_STR_EMPTY (nickname) || !tp_strdiff (nickname, "nickname")) { + if (!tp_strdiff (nickname, "nickname")) { g_free (nickname); - nickname = g_strdup (g_get_user_name ()); - } - if (G_STR_EMPTY (published_name)) { - g_free (published_name); - published_name = g_strdup (g_get_real_name ()); + nickname = NULL; } empathy_debug (DEBUG_DOMAIN, "Salut account created:\n" " nickname=%s\n" - " published-name=%s\n" " first-name=%s\n" " last-name=%s\n" " email=%s\n" " jid=%s\n", - nickname, published_name, first_name, last_name, email, jid); + nickname, first_name, last_name, email, jid); mc_account_set_param_string (account, "nickname", nickname ? nickname : ""); - mc_account_set_param_string (account, "published-name", published_name ? published_name : ""); mc_account_set_param_string (account, "first-name", first_name ? first_name : ""); mc_account_set_param_string (account, "last-name", last_name ? last_name : ""); mc_account_set_param_string (account, "email", email ? email : ""); mc_account_set_param_string (account, "jid", jid ? jid : ""); g_free (nickname); - g_free (published_name); g_free (first_name); g_free (last_name); g_free (email);