[rygel/wip/misc-fixes: 2/4] rygel: Fix environment config



commit 09ef44a15e339afaa02528b64d0d805a06dd302c
Author: Jens Georg <jensg openismus com>
Date:   Sat Dec 15 01:55:00 2012 +0100

    rygel: Fix environment config
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679262

 src/rygel/rygel-environment-config.vala |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/rygel/rygel-environment-config.vala b/src/rygel/rygel-environment-config.vala
index e7188f7..5fd5c31 100644
--- a/src/rygel/rygel-environment-config.vala
+++ b/src/rygel/rygel-environment-config.vala
@@ -31,7 +31,7 @@ using Gee;
  */
 internal class Rygel.EnvironmentConfig : GLib.Object, Configuration {
     private static string RYGEL_PREFIX = "RYGEL";
-    private static string TITLE_KEY = RYGEL_PREFIX + "_TITLE";
+    private static string TITLE_KEY = "TITLE";
     private static string DISABLE_PREFIX = RYGEL_PREFIX + "_DISABLE";
     private static string ENABLED_KEY = "ENABLED";
     private static string INTERFACE_ENV = RYGEL_PREFIX + "_IFACE";
@@ -113,14 +113,14 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration {
     }
 
     public string get_title (string section) throws GLib.Error {
-        return this.get_string (RYGEL_PREFIX + "_" + section, TITLE_KEY);
+        return this.get_string (section, TITLE_KEY);
     }
 
     public string get_string (string section,
                               string key) throws GLib.Error {
         return this.get_string_variable (RYGEL_PREFIX + "_" +
                                          section.up () + "_"  +
-                                         key.up ());
+                                         key.up ().replace ("-", "_"));
     }
 
     public Gee.ArrayList<string> get_string_list (string section,
@@ -141,7 +141,8 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration {
                         int    max)
                         throws GLib.Error {
         return this.get_int_variable (RYGEL_PREFIX + "_" +
-                                      section.up () + "_"  + key,
+                                      section.up () + "_"  +
+                                      key.up ().replace ("-","_"),
                                       min,
                                       max);
     }
@@ -163,7 +164,7 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration {
                           throws GLib.Error {
         return this.get_bool_variable (RYGEL_PREFIX + "_" +
                                        section.up () + "_"  +
-                                       key);
+                                       key.up ().replace ("-","_"));
     }
 
     private string get_string_variable (string variable) throws GLib.Error {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]