[rygel] ui: PreferencesSection provide API to set sensitivity
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] ui: PreferencesSection provide API to set sensitivity
- Date: Thu, 17 Feb 2011 23:49:37 +0000 (UTC)
commit 17ef4f47556c1b7a3efb408659569ebb3d0396c2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Feb 17 18:30:02 2011 +0200
ui: PreferencesSection provide API to set sensitivity
src/ui/rygel-media-export-pref-section.vala | 6 ++++++
src/ui/rygel-network-pref-section.vala | 4 ++++
src/ui/rygel-preferences-section.vala | 1 +
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/rygel-media-export-pref-section.vala b/src/ui/rygel-media-export-pref-section.vala
index 0df55a4..b6531db 100644
--- a/src/ui/rygel-media-export-pref-section.vala
+++ b/src/ui/rygel-media-export-pref-section.vala
@@ -102,6 +102,12 @@ public class Rygel.MediaExportPrefSection : PreferencesSection {
this.config.set_string_list (this.name, URIS_KEY, uri_list);
}
+ public override void set_sensitivity (bool sensitivity) {
+ foreach (var widget in this.widgets) {
+ widget.sensitive = sensitivity;
+ }
+ }
+
private void on_add_button_clicked (Button button) {
if (this.dialog.run () == ResponseType.OK) {
TreeIter iter;
diff --git a/src/ui/rygel-network-pref-section.vala b/src/ui/rygel-network-pref-section.vala
index 94ad487..062f1f0 100644
--- a/src/ui/rygel-network-pref-section.vala
+++ b/src/ui/rygel-network-pref-section.vala
@@ -59,6 +59,10 @@ public class Rygel.NetworkPrefSection : PreferencesSection {
this.config.set_interface (this.iface_entry.get_active_text ());
}
+ public override void set_sensitivity (bool sensitivity) {
+ iface_entry.sensitive = sensitivity;
+ }
+
private void on_context_available (GUPnP.ContextManager manager,
GUPnP.Context context) {
TreeIter iter;
diff --git a/src/ui/rygel-preferences-section.vala b/src/ui/rygel-preferences-section.vala
index e42214a..4b92195 100644
--- a/src/ui/rygel-preferences-section.vala
+++ b/src/ui/rygel-preferences-section.vala
@@ -34,4 +34,5 @@ public abstract class Rygel.PreferencesSection : GLib.Object {
}
public abstract void save ();
+ public abstract void set_sensitivity (bool sensitivity);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]