[gnome-control-center] sharing: fix the sensitivity of the "share with trusted devices" switch



commit d29d75210d519bc4e23ceffeceba4c7322e44e0d
Author: Thomas Wood <thomas wood intel com>
Date:   Mon Jan 21 15:48:10 2013 +0000

    sharing: fix the sensitivity of the "share with trusted devices" switch
    
    Allow the GSettings binding to set the sensitivity of the switch and use a
    box to allow the sharing panel to set the sensitivity of the switch and
    label without conflicting with the GSettings binding.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692220

 panels/sharing/cc-sharing-panel.c |    3 +-
 panels/sharing/sharing.ui         |   66 ++++++++++++++++++++++---------------
 2 files changed, 40 insertions(+), 29 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 56e920a..cf57249 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -271,8 +271,7 @@ cc_sharing_panel_setup_bluetooth_sharing_dialog (CcSharingPanel *self)
                                          WID ("bluetooth-sharing-status-label"));
 
   cc_sharing_panel_bind_switch_to_widgets (WID ("share-public-folder-switch"),
-                                           WID ("only-share-trusted-devices-switch"),
-                                           WID ("only-share-trusted-devices-label"),
+                                           WID ("only-share-trusted-devices-box"),
                                            NULL);
 
   cc_sharing_panel_bind_switch_to_widgets (WID ("save-received-files-to-downloads-switch"),
diff --git a/panels/sharing/sharing.ui b/panels/sharing/sharing.ui
index 18c3370..322f199 100644
--- a/panels/sharing/sharing.ui
+++ b/panels/sharing/sharing.ui
@@ -77,18 +77,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkSwitch" id="only-share-trusted-devices-switch">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</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>
@@ -106,21 +94,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="only-share-trusted-devices-label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes">Only share with Trusted Devices</property>
-                <property name="mnemonic_widget">only-share-trusted-devices-switch</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkGrid" id="receive-files-grid">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -187,6 +160,45 @@
                 <property name="height">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkBox" id="only-share-trusted-devices-box">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel" id="only-share-trusted-devices-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">Only share with Trusted Devices</property>
+                    <property name="mnemonic_widget">only-share-trusted-devices-switch</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSwitch" id="only-share-trusted-devices-switch">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>



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