diff options
author | Alessandro Ghedini <al3xbio@gmail.com> | 2011-11-20 15:50:38 +0100 |
---|---|---|
committer | Alessandro Ghedini <al3xbio@gmail.com> | 2011-11-20 15:50:38 +0100 |
commit | d6b2677825cbb423e2099563c16321c3e23d7899 (patch) | |
tree | fd04dbf76a9bc0fdd3f7755e65d1c175ac5c99dd /src/utilities/config.vala | |
parent | 6451a495637c6e3047a5a56573cffc6e3de9a515 (diff) |
Imported Upstream version 0.3.1upstream/0.3.1
Diffstat (limited to 'src/utilities/config.vala')
-rw-r--r-- | src/utilities/config.vala | 16 |
1 files changed, 6 insertions, 10 deletions
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<Theme?> 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!"); } |