[rygel/config] Use the convenience methods to read values from gconf.
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel/config] Use the convenience methods to read values from gconf.
- Date: Tue, 21 Apr 2009 12:50:18 -0400 (EDT)
commit e9b1389fcbc5e7e42c58ada7d22d4705a3b96e16
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Apr 21 17:48:04 2009 +0300
Use the convenience methods to read values from gconf.
---
src/rygel/rygel-config-reader.vala | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/rygel/rygel-config-reader.vala b/src/rygel/rygel-config-reader.vala
index 364ca77..79d4ad9 100644
--- a/src/rygel/rygel-config-reader.vala
+++ b/src/rygel/rygel-config-reader.vala
@@ -40,16 +40,9 @@ public class Rygel.ConfigReader {
public ConfigReader () {
this.gconf = GConf.Client.get_default ();
- try {
- this.enable_xbox = this.gconf.get_bool (ROOT_GCONF_PATH +
- "enable-xbox");
- this.host_ip = this.gconf.get_string (ROOT_GCONF_PATH + "host-ip");
- this.port = this.gconf.get_int (ROOT_GCONF_PATH + "port");
- } catch (GLib.Error error) {
- this.enable_xbox = false;
- this.host_ip = null;
- this.port = 0;
- }
+ this.enable_xbox = this.get_bool ("general", "enable-xbox", false);
+ this.host_ip = this.get_string ("general", "host-ip", null);
+ this.port = this.get_int ("general", "port", uint16.MIN, uint16.MAX, 0);
}
public string get_title (string section) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]