[gnome-control-center] sharing: add a "show password" check button to the screen sharing dialog



commit 542db2bb3bf5d28e7a9f052c945ad214767404fa
Author: Thomas Wood <thomas wood intel com>
Date:   Wed Jan 23 10:28:44 2013 +0000

    sharing: add a "show password" check button to the screen sharing dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691915

 panels/sharing/cc-sharing-panel.c |    6 +++++-
 panels/sharing/sharing.ui         |   37 ++++++++++++++++++++++++++++++-------
 2 files changed, 35 insertions(+), 8 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index ec6073f..56e920a 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -654,7 +654,7 @@ cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
                                            WID ("remote-control-require-password-switch"),
                                            WID ("remote-control-require-password-label"),
                                            WID ("approve-all-connections-label"),
-                                           WID ("password-box"),
+                                           WID ("password-grid"),
                                            NULL);
 
   cc_sharing_panel_bind_switch_to_widgets (WID ("remote-control-require-password-switch"),
@@ -686,6 +686,10 @@ cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
                                 "text",
                                 G_SETTINGS_BIND_DEFAULT,
                                 vino_get_password, vino_set_password, NULL, NULL);
+
+  g_object_bind_property (WID ("show-password-checkbutton"), "active",
+                          WID ("remote-control-password-entry"), "visibility",
+                          G_BINDING_SYNC_CREATE);
 }
 
 static void
diff --git a/panels/sharing/sharing.ui b/panels/sharing/sharing.ui
index 52ccc05..18c3370 100644
--- a/panels/sharing/sharing.ui
+++ b/panels/sharing/sharing.ui
@@ -1141,9 +1141,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkBox" id="password-box">
+                      <object class="GtkGrid" id="password-grid">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="row_spacing">6</property>
+                        <property name="column_spacing">6</property>
                         <child>
                           <object class="GtkLabel" id="remote-control-password-label">
                             <property name="visible">True</property>
@@ -1154,9 +1156,10 @@
                             <property name="mnemonic_widget">remote-control-password-entry</property>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
                           </packing>
                         </child>
                         <child>
@@ -1170,9 +1173,29 @@
                             <property name="input_purpose">password</property>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="show-password-checkbutton">
+                            <property name="label" translatable="yes">Show Password</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
                           </packing>
                         </child>
                       </object>



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