From 9864ff8553e4351e4ea8faa8888bcdca3b7f58c3 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Fri, 11 Feb 2011 01:45:38 +0200 Subject: [PATCH] core,ui: upnp-enabled != enabled After 'enabled' key in general section of the config file was renamed to 'upnp-enabled', we had forgotten to update the code related to 'enabled' keys in other sections. --- src/rygel/rygel-user-config.vala | 5 +++-- src/ui/rygel-writable-user-config.vala | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rygel/rygel-user-config.vala b/src/rygel/rygel-user-config.vala index e004aa5..f28d19b 100644 --- a/src/rygel/rygel-user-config.vala +++ b/src/rygel/rygel-user-config.vala @@ -31,7 +31,8 @@ public class Rygel.UserConfig : GLib.Object, Configuration { public static const string CONFIG_FILE = "rygel.conf"; public static const string IFACE_KEY = "interface"; public static const string PORT_KEY = "port"; - public static const string ENABLED_KEY = "upnp-enabled"; + public static const string ENABLED_KEY = "enabled"; + public static const string UPNP_ENABLED_KEY = "upnp-" + ENABLED_KEY; public static const string TITLE_KEY = "title"; public static const string TRANSCODING_KEY = "enable-transcoding"; public static const string MP3_TRANSCODER_KEY = "enable-mp3-transcoder"; @@ -50,7 +51,7 @@ public class Rygel.UserConfig : GLib.Object, Configuration { protected KeyFile sys_key_file; public bool get_upnp_enabled () throws GLib.Error { - return this.get_bool ("general", ENABLED_KEY); + return this.get_bool ("general", UPNP_ENABLED_KEY); } public string get_interface () throws GLib.Error { diff --git a/src/ui/rygel-writable-user-config.vala b/src/ui/rygel-writable-user-config.vala index 049e9f6..6544209 100644 --- a/src/ui/rygel-writable-user-config.vala +++ b/src/ui/rygel-writable-user-config.vala @@ -157,7 +157,7 @@ public class Rygel.WritableUserConfig : Rygel.UserConfig { dest.make_symbolic_link (source_path, null); } catch (IOError.EXISTS err) {} - this.set_bool ("general", ENABLED_KEY, true); + this.set_bool ("general", UPNP_ENABLED_KEY, true); } else { // Stop service only if already running if (this.get_enabled ("general")) { @@ -176,7 +176,7 @@ public class Rygel.WritableUserConfig : Rygel.UserConfig { dest.delete (null); } catch (IOError.NOT_FOUND err) {} - this.set_bool ("general", ENABLED_KEY, false); + this.set_bool ("general", UPNP_ENABLED_KEY, false); } } catch (GLib.Error err) { string message; -- 2.7.4