From 3312dcd6979025d1bfdcf80fb686b38d9e0cf50a Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Mon, 28 Sep 2009 02:06:49 +0300 Subject: [PATCH] ui: Separate method to reset sensitivity Separate method to reset sensitivity of plugin widgets. --- src/ui/rygel-plugin-pref-section.vala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/rygel-plugin-pref-section.vala b/src/ui/rygel-plugin-pref-section.vala index d552e8d..f4e2471 100644 --- a/src/ui/rygel-plugin-pref-section.vala +++ b/src/ui/rygel-plugin-pref-section.vala @@ -79,12 +79,16 @@ public class Rygel.PluginPrefSection : PreferencesSection { this.config.set_string (this.name, UserConfig.TITLE_KEY, title); } - protected void on_enabled_check_toggled (CheckButton enabled_check) { + protected void reset_widgets_sensitivity () { this.title_entry.sensitive = - this.title_label.sensitive = enabled_check.active; + this.title_label.sensitive = this.enabled_check.active; foreach (var widget in this.widgets) { widget.sensitive = enabled_check.active; } } + + private void on_enabled_check_toggled (CheckButton enabled_check) { + this.reset_widgets_sensitivity (); + } } -- 2.7.4