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
This commit is contained in:
Thomas Wood 2013-01-21 15:48:10 +00:00
parent 80ec65b2ef
commit d29d75210d
2 changed files with 40 additions and 29 deletions

View file

@ -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"),

View file

@ -76,18 +76,6 @@
<property name="height">1</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="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>
@ -105,21 +93,6 @@
<property name="height">1</property>
</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>
@ -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>