[rygel/config] Keep section name in a object field.
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel/config] Keep section name in a object field.
- Date: Wed, 22 Apr 2009 12:02:43 -0400 (EDT)
commit 15a7a11df2cdb9b10df56179e1582d3b6e833650
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Apr 22 18:32:30 2009 +0300
Keep section name in a object field.
---
src/ui/rygel-preferences-vbox.vala | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/ui/rygel-preferences-vbox.vala b/src/ui/rygel-preferences-vbox.vala
index 5961b2d..8646800 100644
--- a/src/ui/rygel-preferences-vbox.vala
+++ b/src/ui/rygel-preferences-vbox.vala
@@ -26,8 +26,10 @@ public class Rygel.PreferencesVBox : VBox {
ConfigEditor config_editor;
public string title;
+ public string section;
public PreferencesVBox (ConfigEditor config_editor) {
+ this.section = "general";
this.title = "General";
this.config_editor = config_editor;
@@ -120,19 +122,23 @@ public class Rygel.PreferencesVBox : VBox {
var name = widget.get_name ();
var number = ((SpinButton) widget).get_value ();
- this.config_editor.set_int ("general",
+ this.config_editor.set_int (this.section,
name,
(int) number);
} else if (widget is Entry) {
var name = widget.get_name ();
var text = ((Entry) widget).get_text ();
- this.config_editor.set_string ("general", name, text);
+ this.config_editor.set_string (this.section,
+ name,
+ text);
} else if (widget is CheckButton) {
var name = widget.get_name ();
var active = ((CheckButton) widget).get_active ();
- this.config_editor.set_bool ("general", name, active);
+ this.config_editor.set_bool (this.section,
+ name,
+ active);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]