]> git.0d.be Git - empathy.git/commitdiff
Change labels when creating an account
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 5 Aug 2009 10:02:39 +0000 (12:02 +0200)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sat, 22 Aug 2009 13:20:44 +0000 (14:20 +0100)
libempathy-gtk/empathy-account-widget-jabber.ui
libempathy-gtk/empathy-account-widget.c
src/empathy-account-assistant.c

index a2165393cd883eb64e23d11bacac23020ad17c07..164bbcdf92ae65890292f64a3b457170bb2081fb 100644 (file)
   <object class="GtkVBox" id="vbox_jabber_simple">
     <property name="visible">True</property>
     <property name="orientation">vertical</property>
-    <property name="spacing">6</property>
     <child>
       <object class="GtkLabel" id="label_id_simple">
         <property name="visible">True</property>
         <property name="position">0</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkLabel" id="label_id_create">
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">What is your desired Jabber ID?</property>
+      </object>
+      <packing>
+        <property name="position">1</property>
+      </packing>
+    </child>
     <child>
       <object class="GtkAlignment" id="alignment1">
         <property name="visible">True</property>
         <property name="yalign">0</property>
         <property name="xscale">0.34999999403953552</property>
         <property name="yscale">0.34999999403953552</property>
+        <property name="top_padding">6</property>
         <property name="left_padding">12</property>
         <child>
           <object class="GtkEntry" id="entry_id_simple">
         </child>
       </object>
       <packing>
-        <property name="position">1</property>
+        <property name="position">2</property>
       </packing>
     </child>
     <child>
       <object class="GtkLabel" id="label_password_simple">
         <property name="visible">True</property>
         <property name="xalign">0</property>
+        <property name="ypad">6</property>
         <property name="label" translatable="yes">What is your Jabber password?</property>
       </object>
       <packing>
-        <property name="position">2</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label_password_create">
+        <property name="xalign">0</property>
+        <property name="ypad">6</property>
+        <property name="label" translatable="yes">What is your desired Jabber password?</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
       </packing>
     </child>
     <child>
         </child>
       </object>
       <packing>
-        <property name="position">3</property>
+        <property name="position">5</property>
       </packing>
     </child>
   </object>
index 27120c51ad348cc3e633c3331f90d949e2de774f..713f50048fbb617a20ec1cdbfdfc30af3a7322f1 100644 (file)
@@ -666,12 +666,26 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
   GtkWidget *spinbutton_port;
   GtkWidget *checkbutton_ssl;
+  GtkWidget *label_id, *label_password;
+  GtkWidget *label_id_create, *label_password_create;
 
   if (priv->simple)
     {
       self->ui_details->gui = empathy_builder_get_file (filename,
           "vbox_jabber_simple", &self->ui_details->widget,
+          "label_id_simple", &label_id,
+          "label_id_create", &label_id_create,
+          "label_password_simple", &label_password,
+          "label_password_create", &label_password_create,
           NULL);
+
+      if (empathy_account_settings_get_boolean (priv->settings, "register"))
+        {
+          gtk_widget_hide (label_id);
+          gtk_widget_hide (label_password);
+          gtk_widget_show (label_id_create);
+          gtk_widget_show (label_password_create);
+        }
       
       empathy_account_widget_handle_params (self,
           "entry_id_simple", "account",
index 5fd1258165ab8f2f0745751e52a058c11c4f36e9..91ba26b68db5df55b1f61af9398e84cad744a54e 100644 (file)
@@ -125,6 +125,10 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser,
   str = g_strdup_printf (_("New %s account"), proto->name);
 
   settings = empathy_account_settings_new (cm->name, proto->name, str);
+
+  if (priv->first_resp == RESPONSE_CREATE_ACCOUNT)
+    empathy_account_settings_set_boolean (settings, "register", TRUE);
+
   account_widget = empathy_account_widget_simple_new_for_protocol
     (proto->name, settings, &widget_object);