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/pies/load.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pies/load.vala') diff --git a/src/pies/load.vala b/src/pies/load.vala index 912ddf0..98fd72f 100644 --- a/src/pies/load.vala +++ b/src/pies/load.vala @@ -115,7 +115,7 @@ namespace Pies { } // add a new Pie with the loaded properties - var pie = PieManager.create_persistent_pie(name, icon, hotkey, id); + var pie = PieManager.create_persistent_pie(name, icon, new Trigger.from_string(hotkey), id); // and parse all child elements for (Xml.Node* slice = node->children; slice != null; slice = slice->next) { -- cgit v1.2.3 From 60560a030fda3c539ff9dc1563b9926414a193da Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sat, 21 Jan 2012 19:07:09 +0100 Subject: Imported Upstream version 0.4.0 --- src/pies/load.vala | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'src/pies/load.vala') diff --git a/src/pies/load.vala b/src/pies/load.vala index 98fd72f..b606cf5 100644 --- a/src/pies/load.vala +++ b/src/pies/load.vala @@ -80,7 +80,7 @@ namespace Pies { string name = ""; string icon = ""; string id = ""; - int quick_action = -1; + int quickaction = -1; // parse all attributes of this node for (Xml.Attr* attribute = node->properties; attribute != null; attribute = attribute->next) { @@ -92,7 +92,7 @@ namespace Pies { hotkey = attr_content; break; case "quickaction": - quick_action = int.parse(attr_content); + quickaction = int.parse(attr_content); break; case "name": name = attr_content; @@ -145,7 +145,7 @@ namespace Pies { string icon=""; string command=""; string type=""; - bool quick_action = false; + bool quickaction = false; // parse all attributes of this node for (Xml.Attr* attribute = slice->properties; attribute != null; attribute = attribute->next) { @@ -166,7 +166,7 @@ namespace Pies { type = attr_content; break; case "quickaction": - quick_action = bool.parse(attr_content); + quickaction = bool.parse(attr_content); break; default: warning("Invalid attribute \"" + attr_name + "\" in element in pies.conf!"); @@ -174,19 +174,8 @@ namespace Pies { } } - Action action = null; - // create a new Action according to the loaded type - foreach (var action_type in ActionRegistry.types) { - if (ActionRegistry.settings_names[action_type] == type) { - - action = GLib.Object.new(action_type, "name", name, - "icon", icon, - "real_command", command, - "is_quick_action", quick_action) as Action; - break; - } - } + Action action = ActionRegistry.create_action(type, name, icon, command, quickaction); if (action != null) pie.add_action(action); } @@ -213,15 +202,7 @@ namespace Pies { } } - ActionGroup group = null; - - // create a new ActionGroup according to the loaded type - foreach (var group_type in GroupRegistry.types) { - if (GroupRegistry.settings_names[group_type] == type) { - group = GLib.Object.new(group_type, "parent_id", pie.id) as ActionGroup; - break; - } - } + ActionGroup group = GroupRegistry.create_group(type, pie.id); if (group != null) pie.add_group(group); } -- cgit v1.2.3