From d6b2677825cbb423e2099563c16321c3e23d7899 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sun, 20 Nov 2011 15:50:38 +0100 Subject: Imported Upstream version 0.3.1 --- src/utilities/config.vala | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/utilities/config.vala') diff --git a/src/utilities/config.vala b/src/utilities/config.vala index c5dedd5..cf4311d 100644 --- a/src/utilities/config.vala +++ b/src/utilities/config.vala @@ -56,7 +56,6 @@ public class Config : GLib.Object { public double global_scale { get; set; default = 1.0; } public bool show_indicator { get; set; default = true; } public bool open_at_mouse { get; set; default = true; } - public bool turbo_mode { get; set; default = false; } public bool auto_start { get; set; default = false; } public Gee.ArrayList themes { get; private set; } @@ -73,7 +72,6 @@ public class Config : GLib.Object { writer.write_attribute("global_scale", global_scale.to_string()); writer.write_attribute("show_indicator", show_indicator ? "true" : "false"); writer.write_attribute("open_at_mouse", open_at_mouse ? "true" : "false"); - writer.write_attribute("turbo_mode", turbo_mode ? "true" : "false"); writer.end_element(); writer.end_document(); } @@ -119,9 +117,6 @@ public class Config : GLib.Object { case "open_at_mouse": open_at_mouse = bool.parse(attr_content); break; - case "turbo_mode": - turbo_mode = bool.parse(attr_content); - break; default: warning("Invalid setting \"" + attr_name + "\" in gnome-pie.conf!"); break; @@ -160,16 +155,17 @@ public class Config : GLib.Object { // load global themes var d = Dir.open(Paths.global_themes); while ((name = d.read_name()) != null) { - var theme = new Theme(Paths.global_themes + "/" + name); - if (theme != null) - themes.add(theme); + var theme = new Theme(Paths.global_themes + "/" + name); + + if (theme.load()) + themes.add(theme); } // load local themes d = Dir.open(Paths.local_themes); while ((name = d.read_name()) != null) { var theme = new Theme(Paths.local_themes + "/" + name); - if (theme != null) + if (theme.load()) themes.add(theme); } @@ -185,7 +181,6 @@ public class Config : GLib.Object { foreach (var t in themes) { if (t.name == current) { theme = t; - theme.load_images(); break; } } @@ -193,6 +188,7 @@ public class Config : GLib.Object { theme = themes[0]; warning("Theme \"" + current + "\" not found! Using fallback..."); } + theme.load_images(); } else error("No theme found!"); } -- cgit v1.2.3