]> git.0d.be Git - empathy.git/commitdiff
Move nickname to the main section of account setting UI and do not set automatically...
authorXavier Claessens <xclaesse@src.gnome.org>
Thu, 7 Feb 2008 21:14:44 +0000 (21:14 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Thu, 7 Feb 2008 21:14:44 +0000 (21:14 +0000)
svn path=/trunk/; revision=605

libempathy-gtk/empathy-account-widget-salut.glade
src/empathy.c

index 14ede69588c31c61dc7d009f6e9abe8edf3978a5..ab725c6ff87b651f9e1c21f7b92a423a30b8434b 100644 (file)
@@ -28,7 +28,7 @@
       <child>
        <widget class="GtkTable" id="table_common_settings">
          <property name="visible">True</property>
-         <property name="n_rows">2</property>
+         <property name="n_rows">3</property>
          <property name="n_columns">3</property>
          <property name="homogeneous">False</property>
          <property name="row_spacing">6</property>
            </packing>
          </child>
 
+         <child>
+           <widget class="GtkLabel" id="label_nickname">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Nickname:</property>
+             <property name="use_underline">True</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="mnemonic_widget">entry_nickname</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="left_attach">0</property>
+             <property name="right_attach">1</property>
+             <property name="top_attach">2</property>
+             <property name="bottom_attach">3</property>
+             <property name="x_options">fill</property>
+             <property name="y_options"></property>
+           </packing>
+         </child>
+
          <child>
            <widget class="GtkEntry" id="entry_first_name">
              <property name="visible">True</property>
              <property name="y_options"></property>
            </packing>
          </child>
+
+         <child>
+           <widget class="GtkEntry" id="entry_nickname">
+             <property name="visible">True</property>
+             <property name="can_focus">True</property>
+             <property name="editable">True</property>
+             <property name="visibility">True</property>
+             <property name="max_length">0</property>
+             <property name="text" translatable="yes"></property>
+             <property name="has_frame">True</property>
+             <property name="invisible_char">*</property>
+             <property name="activates_default">False</property>
+           </widget>
+           <packing>
+             <property name="left_attach">1</property>
+             <property name="right_attach">3</property>
+             <property name="top_attach">2</property>
+             <property name="bottom_attach">3</property>
+             <property name="y_options"></property>
+           </packing>
+         </child>
+
        </widget>
        <packing>
          <property name="padding">0</property>
          <child>
            <widget class="GtkTable" id="table_advanced_settings">
              <property name="visible">True</property>
-             <property name="n_rows">4</property>
+             <property name="n_rows">3</property>
              <property name="n_columns">3</property>
              <property name="homogeneous">False</property>
              <property name="row_spacing">6</property>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">2</property>
-                 <property name="bottom_attach">3</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">3</property>
-                 <property name="bottom_attach">4</property>
+                 <property name="top_attach">2</property>
+                 <property name="bottom_attach">3</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">3</property>
-                 <property name="top_attach">2</property>
-                 <property name="bottom_attach">3</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
                  <property name="y_options"></property>
                </packing>
              </child>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">3</property>
-                 <property name="top_attach">3</property>
-                 <property name="bottom_attach">4</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkLabel" id="label_nickname">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">_Nickname:</property>
-                 <property name="use_underline">True</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="mnemonic_widget">entry_nickname</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
-                 <property name="x_options">fill</property>
+                 <property name="top_attach">2</property>
+                 <property name="bottom_attach">3</property>
                  <property name="y_options"></property>
                </packing>
              </child>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkEntry" id="entry_nickname">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="editable">True</property>
-                 <property name="visibility">True</property>
-                 <property name="max_length">0</property>
-                 <property name="text" translatable="yes"></property>
-                 <property name="has_frame">True</property>
-                 <property name="invisible_char">*</property>
-                 <property name="activates_default">False</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">3</property>
                  <property name="top_attach">0</property>
                  <property name="bottom_attach">1</property>
+                 <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">3</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
                  <property name="y_options"></property>
                </packing>
              </child>
index a4a90e2c5e962de9efea19f4b20cd208c178a34e..5f76ecc0be9b3bec18cccd7e35faa5d300a2a496 100644 (file)
@@ -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);