[empathy/gnome-2-34: 41/60] account-widget: add Remember Password widgets for all the other protocols



commit 6d70f108f31d437f5a0092ebdc2be84768073c01
Author: Jonny Lamb <jonnylamb gnome org>
Date:   Fri Dec 10 12:28:09 2010 +0000

    account-widget: add Remember Password widgets for all the other protocols
    
    ...and link these widgets up nicely.
    
    Signed-off-by: Jonny Lamb <jonnylamb gnome org>

 libempathy-gtk/empathy-account-widget-aim.ui       |   34 +++++++++-
 libempathy-gtk/empathy-account-widget-groupwise.ui |   40 ++++++++++-
 libempathy-gtk/empathy-account-widget-icq.ui       |   34 +++++++++-
 libempathy-gtk/empathy-account-widget-jabber.ui    |   70 +++++++++++++++++---
 libempathy-gtk/empathy-account-widget-msn.ui       |   40 ++++++++++-
 libempathy-gtk/empathy-account-widget-sip.ui       |   40 ++++++++++-
 libempathy-gtk/empathy-account-widget.c            |   47 +++++++++++++
 7 files changed, 281 insertions(+), 24 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget-aim.ui b/libempathy-gtk/empathy-account-widget-aim.ui
index b590eea..fb2e518 100644
--- a/libempathy-gtk/empathy-account-widget-aim.ui
+++ b/libempathy-gtk/empathy-account-widget-aim.ui
@@ -15,7 +15,7 @@
     <child>
       <object class="GtkTable" id="table_common_settings">
         <property name="visible">True</property>
-        <property name="n_rows">3</property>
+        <property name="n_rows">4</property>
         <property name="n_columns">2</property>
         <property name="column_spacing">12</property>
         <property name="row_spacing">6</property>
@@ -91,6 +91,25 @@
           </packing>
         </child>
         <child>
+          <object class="GtkCheckButton" id="remember_password">
+            <property name="label" translatable="yes">Remember Password</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
           <placeholder/>
         </child>
       </object>
@@ -273,5 +292,18 @@
         <property name="position">3</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
   </object>
 </interface>
diff --git a/libempathy-gtk/empathy-account-widget-groupwise.ui b/libempathy-gtk/empathy-account-widget-groupwise.ui
index 1629a01..1cf2ea7 100644
--- a/libempathy-gtk/empathy-account-widget-groupwise.ui
+++ b/libempathy-gtk/empathy-account-widget-groupwise.ui
@@ -14,7 +14,7 @@
     <child>
       <object class="GtkTable" id="table_common_groupwise_settings">
         <property name="visible">True</property>
-        <property name="n_rows">3</property>
+        <property name="n_rows">4</property>
         <property name="n_columns">2</property>
         <property name="column_spacing">12</property>
         <property name="row_spacing">6</property>
@@ -75,9 +75,6 @@
           </packing>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkEntry" id="entry_password">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -90,6 +87,28 @@
             <property name="bottom_attach">3</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkCheckButton" id="remember_password">
+            <property name="label" translatable="yes">Remember Password</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="expand">False</property>
@@ -270,5 +289,18 @@
         <property name="position">3</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
   </object>
 </interface>
diff --git a/libempathy-gtk/empathy-account-widget-icq.ui b/libempathy-gtk/empathy-account-widget-icq.ui
index 654174f..4d95978 100644
--- a/libempathy-gtk/empathy-account-widget-icq.ui
+++ b/libempathy-gtk/empathy-account-widget-icq.ui
@@ -15,7 +15,7 @@
     <child>
       <object class="GtkTable" id="table_common_settings">
         <property name="visible">True</property>
-        <property name="n_rows">3</property>
+        <property name="n_rows">4</property>
         <property name="n_columns">2</property>
         <property name="column_spacing">12</property>
         <property name="row_spacing">6</property>
@@ -91,6 +91,25 @@
           </packing>
         </child>
         <child>
+          <object class="GtkCheckButton" id="remember_password">
+            <property name="label" translatable="yes">Remember Password</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
           <placeholder/>
         </child>
       </object>
@@ -301,5 +320,18 @@
         <property name="position">3</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
   </object>
 </interface>
diff --git a/libempathy-gtk/empathy-account-widget-jabber.ui b/libempathy-gtk/empathy-account-widget-jabber.ui
index 6820eab..d427b52 100644
--- a/libempathy-gtk/empathy-account-widget-jabber.ui
+++ b/libempathy-gtk/empathy-account-widget-jabber.ui
@@ -21,7 +21,7 @@
     <child>
       <object class="GtkTable" id="table_common_settings">
         <property name="visible">True</property>
-        <property name="n_rows">3</property>
+        <property name="n_rows">4</property>
         <property name="n_columns">2</property>
         <property name="column_spacing">12</property>
         <property name="row_spacing">6</property>
@@ -46,8 +46,6 @@
           <packing>
             <property name="left_attach">1</property>
             <property name="right_attach">2</property>
-            <property name="top_attach">0</property>
-            <property name="bottom_attach">1</property>
           </packing>
         </child>
         <child>
@@ -60,10 +58,6 @@
           </object>
           <packing>
             <property name="x_options">GTK_FILL</property>
-            <property name="left_attach">0</property>
-            <property name="right_attach">1</property>
-            <property name="top_attach">0</property>
-            <property name="bottom_attach">1</property>
           </packing>
         </child>
         <child>
@@ -76,11 +70,9 @@
             <property name="mnemonic_widget">entry_password</property>
           </object>
           <packing>
-            <property name="x_options">GTK_FILL</property>
-            <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">GTK_FILL</property>
           </packing>
         </child>
         <child>
@@ -142,6 +134,25 @@ Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to cho
           </packing>
         </child>
         <child>
+          <object class="GtkCheckButton" id="remember_password">
+            <property name="label" translatable="yes">Remember Password</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
           <placeholder/>
         </child>
       </object>
@@ -509,6 +520,19 @@ Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to cho
         <property name="position">5</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">6</property>
+      </packing>
+    </child>
   </object>
   <object class="GtkVBox" id="vbox_gtalk_simple">
     <property name="visible">True</property>
@@ -599,6 +623,19 @@ Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to cho
         <property name="position">3</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_g_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
   </object>
   <object class="GtkVBox" id="vbox_fb_simple">
     <property name="visible">True</property>
@@ -691,5 +728,18 @@ Use &lt;a href="http://www.facebook.com/username/"&gt;this page&lt;/a&gt; to cho
         <property name="position">3</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_fb_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
   </object>
 </interface>
diff --git a/libempathy-gtk/empathy-account-widget-msn.ui b/libempathy-gtk/empathy-account-widget-msn.ui
index 133ce48..6665133 100644
--- a/libempathy-gtk/empathy-account-widget-msn.ui
+++ b/libempathy-gtk/empathy-account-widget-msn.ui
@@ -14,7 +14,7 @@
     <child>
       <object class="GtkTable" id="table_common_msn_settings">
         <property name="visible">True</property>
-        <property name="n_rows">3</property>
+        <property name="n_rows">4</property>
         <property name="n_columns">2</property>
         <property name="column_spacing">12</property>
         <property name="row_spacing">6</property>
@@ -75,9 +75,6 @@
           </packing>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkEntry" id="entry_password">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -90,6 +87,28 @@
             <property name="bottom_attach">3</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkCheckButton" id="remember_password">
+            <property name="label" translatable="yes">Remember Password</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="expand">False</property>
@@ -270,5 +289,18 @@
         <property name="position">3</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
   </object>
 </interface>
diff --git a/libempathy-gtk/empathy-account-widget-sip.ui b/libempathy-gtk/empathy-account-widget-sip.ui
index b00eda9..98a8f2c 100644
--- a/libempathy-gtk/empathy-account-widget-sip.ui
+++ b/libempathy-gtk/empathy-account-widget-sip.ui
@@ -13,7 +13,7 @@
     <child>
       <object class="GtkTable" id="table_common_settings">
         <property name="visible">True</property>
-        <property name="n_rows">3</property>
+        <property name="n_rows">4</property>
         <property name="n_columns">2</property>
         <property name="column_spacing">12</property>
         <property name="row_spacing">6</property>
@@ -75,9 +75,6 @@
           </packing>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkEntry" id="entry_password">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -89,6 +86,28 @@
             <property name="bottom_attach">3</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkCheckButton" id="remember_password">
+            <property name="label" translatable="yes">Remember Password</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="expand">False</property>
@@ -583,6 +602,19 @@
         <property name="position">3</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkCheckButton" id="remember_password_simple">
+        <property name="label" translatable="yes">Remember Password</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
   </object>
   <object class="GtkAdjustment" id="adjustment2">
     <property name="upper">65535</property>
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 27b6e9b..41832b1 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -975,6 +975,17 @@ account_widget_build_sip (EmpathyAccountWidget *self,
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
   empathy_account_widget_sip_build (self, filename,
     &priv->table_common_settings);
+
+  if (priv->simple)
+    {
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_simple"));
+    }
+  else
+    {
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password"));
+    }
 }
 
 static void
@@ -995,6 +1006,9 @@ account_widget_build_msn (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_id_simple");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_simple"));
     }
   else
     {
@@ -1011,6 +1025,9 @@ account_widget_build_msn (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_id");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password"));
     }
 }
 
@@ -1137,6 +1154,9 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_id_simple");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_simple"));
     }
   else if (priv->simple && is_gtalk)
     {
@@ -1151,6 +1171,9 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_id_g_simple");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_g_simple"));
     }
   else if (priv->simple && is_facebook)
     {
@@ -1167,6 +1190,9 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
       setup_facebook_id_widget (self, entry_id);
 
       self->ui_details->default_focus = g_strdup ("entry_id_fb_simple");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_fb_simple"));
     }
   else
     {
@@ -1211,6 +1237,9 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
       self->ui_details->default_focus = g_strdup ("entry_id");
       priv->spinbutton_port = spinbutton_port;
 
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password"));
+
       g_signal_connect (checkbutton_ssl, "toggled",
           G_CALLBACK (account_widget_jabber_ssl_toggled_cb),
           self);
@@ -1248,6 +1277,9 @@ account_widget_build_icq (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_uin_simple");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_simple"));
     }
   else
     {
@@ -1266,6 +1298,9 @@ account_widget_build_icq (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_uin");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password"));
     }
 }
 
@@ -1288,6 +1323,9 @@ account_widget_build_aim (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_screenname_simple");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_simple"));
     }
   else
     {
@@ -1305,6 +1343,9 @@ account_widget_build_aim (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_screenname");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password"));
     }
 }
 
@@ -1372,6 +1413,9 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_id_simple");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password_simple"));
     }
   else
     {
@@ -1388,6 +1432,9 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
           NULL);
 
       self->ui_details->default_focus = g_strdup ("entry_id");
+
+      priv->remember_password_widget = GTK_WIDGET (gtk_builder_get_object (
+              self->ui_details->gui, "remember_password"));
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]