[rygel] ui: All widgets must be disabled if sharing is



commit 01a212c162ec1c80ae63805ecdd2738fb8b9d5a0
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Feb 17 23:03:15 2011 +0200

    ui: All widgets must be disabled if sharing is

 src/ui/rygel-preferences-dialog.vala |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
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);
+        }
+    }
 }



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