From: Zeeshan Ali (Khattak) Date: Thu, 17 Feb 2011 21:03:15 +0000 (+0200) Subject: ui: All widgets must be disabled if sharing is X-Git-Tag: RYGEL_0_9_9~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01a212c162ec1c80ae63805ecdd2738fb8b9d5a0;p=profile%2Fivi%2Frygel.git ui: All widgets must be disabled if sharing is --- diff --git a/src/ui/rygel-preferences-dialog.vala b/src/ui/rygel-preferences-dialog.vala index e5cf50c..11cc589 100644 --- a/src/ui/rygel-preferences-dialog.vala +++ b/src/ui/rygel-preferences-dialog.vala @@ -56,6 +56,10 @@ public class Rygel.PreferencesDialog : GLib.Object { this.sections.add (new NetworkPrefSection (this.builder, this.config)); this.sections.add (new MediaExportPrefSection (this.builder, this.config)); + + // All sections must be disabled if sharing is disabled + this.on_upnp_check_button_toggled (this.upnp_check); + this.upnp_check.toggled.connect (this.on_upnp_check_button_toggled); } public void run () { @@ -88,4 +92,10 @@ public class Rygel.PreferencesDialog : GLib.Object { return 0; } + + private void on_upnp_check_button_toggled (ToggleButton upnp_check) { + foreach (var section in this.sections) { + section.set_sensitivity (upnp_check.active); + } + } }