[rygel] ui: Keep the title label ref in the widget list



commit 783159510d1b876abd5cce62d72b59e2a2a81933
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Sep 28 02:19:28 2009 +0300

    ui: Keep the title label ref in the widget list

 src/ui/rygel-plugin-pref-section.vala |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/ui/rygel-plugin-pref-section.vala b/src/ui/rygel-plugin-pref-section.vala
index f4e2471..fb1d370 100644
--- a/src/ui/rygel-plugin-pref-section.vala
+++ b/src/ui/rygel-plugin-pref-section.vala
@@ -30,7 +30,6 @@ public class Rygel.PluginPrefSection : PreferencesSection {
 
     private CheckButton enabled_check;
     private Entry title_entry;
-    private Label title_label;
 
     protected ArrayList<Widget> widgets; // All widgets in this section
 
@@ -47,9 +46,10 @@ public class Rygel.PluginPrefSection : PreferencesSection {
         this.title_entry = (Entry) builder.get_object (name.down () +
                                                        TITLE_ENTRY);
         assert (this.title_entry != null);
-        this.title_label = (Label) builder.get_object (name.down () +
-                                                       TITLE_LABEL);
-        assert (this.title_label != null);
+        var title_label = (Label) builder.get_object (name.down () +
+                                                      TITLE_LABEL);
+        assert (title_label != null);
+        this.widgets.add (title_label);
 
         this.enabled_check.active = config.get_enabled (name);
 
@@ -80,8 +80,7 @@ public class Rygel.PluginPrefSection : PreferencesSection {
     }
 
     protected void reset_widgets_sensitivity () {
-        this.title_entry.sensitive =
-        this.title_label.sensitive = this.enabled_check.active;
+        this.title_entry.sensitive = this.enabled_check.active;
 
         foreach (var widget in this.widgets) {
             widget.sensitive = enabled_check.active;



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