[gnome-control-center] sharing: address ambiguity in the screen sharing dialog



commit ab4a5230be9bb4298a1d9d2c6d7aac1299ea41c8
Author: Thomas Wood <thos gnome org>
Date:   Sat Feb 15 19:29:22 2014 +0000

    sharing: address ambiguity in the screen sharing dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723280

 panels/sharing/cc-sharing-panel.c |   12 ++--
 panels/sharing/sharing.ui         |  127 +++++++++++++++++--------------------
 2 files changed, 63 insertions(+), 76 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 7770315..6654a75 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -914,17 +914,17 @@ screen_sharing_show_cb (GtkWidget *widget, CcSharingPanel *self)
 static void
 screen_sharing_hide_cb (GtkWidget *widget, CcSharingPanel *self)
 {
-  GtkSwitch   *pw_switch;
+  GtkToggleButton *ac_radio;
   GtkEntry    *pw_entry;
   const gchar *password;
   CcSharingPanelPrivate *priv = self->priv;
 
-  pw_switch = GTK_SWITCH (WID ("remote-control-require-password-switch"));
+  ac_radio = GTK_TOGGLE_BUTTON (WID ("approve-connections-radiobutton"));
   pw_entry = GTK_ENTRY (WID ("remote-control-password-entry"));
   password = gtk_entry_get_text (pw_entry);
 
   if (password == NULL || *password == '\0')
-    gtk_switch_set_active (pw_switch, FALSE);
+    gtk_toggle_button_set_active (ac_radio, TRUE);
 }
 
 #define MAX_PASSWORD_SIZE 8
@@ -972,7 +972,7 @@ cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
                                            WID ("remote-control-box"),
                                            NULL);
 
-  cc_sharing_panel_bind_switch_to_widgets (WID ("remote-control-require-password-switch"),
+  cc_sharing_panel_bind_switch_to_widgets (WID ("require-password-radiobutton"),
                                            WID ("password-grid"),
                                            NULL);
 
@@ -987,10 +987,10 @@ cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
                    "active",
                    G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN);
   g_settings_bind (settings, "prompt-enabled",
-                   WID ("approve-all-connections-switch"), "active",
+                   WID ("approve-connections-radiobutton"), "active",
                    G_SETTINGS_BIND_DEFAULT);
   g_settings_bind_with_mapping (settings, "authentication-methods",
-                                WID ("remote-control-require-password-switch"),
+                                WID ("require-password-radiobutton"),
                                 "active",
                                 G_SETTINGS_BIND_DEFAULT,
                                 vino_get_authtype, vino_set_authtype, NULL, NULL);
diff --git a/panels/sharing/sharing.ui b/panels/sharing/sharing.ui
index a29b035..c040b46 100644
--- a/panels/sharing/sharing.ui
+++ b/panels/sharing/sharing.ui
@@ -1012,10 +1012,7 @@
                     <property name="can_focus">False</property>
                     <property name="halign">start</property>
                     <property name="hexpand">True</property>
-                    <property name="label" translatable="yes">Remote View</property>
-                    <attributes>
-                     <attribute name="weight" value="bold"/>
-                    </attributes>
+                    <property name="label" translatable="yes">Screen Sharing</property>
                     <property name="mnemonic_widget">remote-view-switch</property>
                   </object>
                   <packing>
@@ -1041,11 +1038,8 @@
                             <property name="can_focus">False</property>
                             <property name="halign">start</property>
                             <property name="hexpand">True</property>
-                            <property name="label" translatable="yes">Remote Control</property>
+                            <property name="label" translatable="yes">Allow Remote Control</property>
                             <property name="mnemonic_widget">remote-control-switch</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -1076,65 +1070,7 @@
                       <object class="GtkGrid" id="remote-control-grid">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="row_spacing">12</property>
-                        <child>
-                          <object class="GtkLabel" id="remote-control-require-password-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">start</property>
-                            <property name="label" translatable="yes">Require Password</property>
-                            <property 
name="mnemonic_widget">remote-control-require-password-switch</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="approve-all-connections-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">start</property>
-                            <property name="hexpand">True</property>
-                            <property name="label" translatable="yes">Approve All Connections</property>
-                            <property name="use_markup">True</property>
-                            <property name="mnemonic_widget">approve-all-connections-switch</property>
-                          </object>
-                          <packing>
-                            <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>
-                          <object class="GtkSwitch" id="remote-control-require-password-switch">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="halign">end</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>
-                        <child>
-                          <object class="GtkSwitch" id="approve-all-connections-switch">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="halign">end</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
+                        <property name="row_spacing">6</property>
                         <child>
                           <object class="GtkGrid" id="password-grid">
                             <property name="visible">True</property>
@@ -1146,8 +1082,8 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="halign">start</property>
-                                <property name="hexpand">True</property>
-                                <property name="label" translatable="yes">Password</property>
+                                <property name="margin_left">12</property>
+                                <property name="label" translatable="yes">Password:</property>
                                 <property name="mnemonic_widget">remote-control-password-entry</property>
                               </object>
                               <packing>
@@ -1161,6 +1097,7 @@
                               <object class="GtkEntry" id="remote-control-password-entry">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
+                                <property name="hexpand">True</property>
                                 <property name="visibility">False</property>
                                 <property name="invisible_char">●</property>
                                 <property name="shadow_type">none</property>
@@ -1195,8 +1132,58 @@
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
+                            <property name="top_attach">3</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Access Options</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
+                          <packing>
+                            <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>
+                          <object class="GtkRadioButton" id="approve-connections-radiobutton">
+                            <property name="label" translatable="yes">New connections must ask for 
access</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>
+                            <property name="group">require-password-radiobutton</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="require-password-radiobutton">
+                            <property name="label" translatable="yes">Require a 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">0</property>
                             <property name="top_attach">2</property>
-                            <property name="width">2</property>
+                            <property name="width">1</property>
                             <property name="height">1</property>
                           </packing>
                         </child>


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