summaryrefslogtreecommitdiff
path: root/src/themes
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2011-11-20 15:50:38 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2011-11-20 15:51:50 +0100
commit3997b71e281a5f43cc8c1892e85de30728df7b2d (patch)
tree96f2be7c48af03b7c540eba9dd6680eb270f23b8 /src/themes
parent902829c62f552f35517783570025b479745de3c5 (diff)
Imported Upstream version 0.3.1
Diffstat (limited to 'src/themes')
-rw-r--r--src/themes/theme.vala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/themes/theme.vala b/src/themes/theme.vala
index fa6f55a..284e1ef 100644
--- a/src/themes/theme.vala
+++ b/src/themes/theme.vala
@@ -71,8 +71,6 @@ public class Theme : GLib.Object {
this.inactive_slice_layers = new Gee.ArrayList<SliceLayer?>();
this.directory = dir;
-
- this.load();
}
/////////////////////////////////////////////////////////////////////
@@ -80,7 +78,7 @@ public class Theme : GLib.Object {
/// explicitly.
/////////////////////////////////////////////////////////////////////
- public void load() {
+ public bool load() {
this.center_layers.clear();
this.active_slice_layers.clear();
this.inactive_slice_layers.clear();
@@ -90,15 +88,15 @@ public class Theme : GLib.Object {
Xml.Doc* themeXML = Xml.Parser.parse_file(path);
if (themeXML == null) {
- warning("Error parsing theme: \"" + path + "\" not found!");
- return;
+ warning("Failed to add theme: \"" + path + "\" not found!");
+ return false;
}
Xml.Node* root = themeXML->get_root_element();
if (root == null) {
delete themeXML;
- warning("Invalid theme \"" + this.directory + "\": theme.xml is empty!");
- return;
+ warning("Failed to add theme: \"theme.xml\" is empty!");
+ return false;
}
this.parse_root(root);
@@ -107,6 +105,8 @@ public class Theme : GLib.Object {
Xml.Parser.cleanup();
this.radius *= max_zoom;
+
+ return true;
}
/////////////////////////////////////////////////////////////////////