From 7556967bf57453d412a8f18633599f38806f8620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 4 Oct 2015 13:00:51 +0200 Subject: Imported Upstream version 0.6.7 --- src/pies/defaultConfig.vala | 4 ++++ src/pies/load.vala | 11 ++++------- src/pies/save.vala | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/pies') diff --git a/src/pies/defaultConfig.vala b/src/pies/defaultConfig.vala index e446c2b..8763a1d 100644 --- a/src/pies/defaultConfig.vala +++ b/src/pies/defaultConfig.vala @@ -62,6 +62,10 @@ namespace Pies { window.add_action(new KeyAction(_("Maximize"), "view-fullscreen", "F10")); window.add_action(new KeyAction(_("Restore"), "view-restore", "F5")); + // add a pie with window list group + var alt_tab = PieManager.create_persistent_pie("Alt Tab", "dock", new Trigger.from_string("T")); + alt_tab.add_group(new WindowListGroup(alt_tab.id)); + // save the configuration to file Pies.save(); } diff --git a/src/pies/load.vala b/src/pies/load.vala index 7402094..0dfb423 100644 --- a/src/pies/load.vala +++ b/src/pies/load.vala @@ -192,17 +192,14 @@ namespace Pies { string attr_name = attribute->name.down(); string attr_content = attribute->children->content; - switch (attr_name) { - case "type": - type = attr_content; - break; - default: - warning("Invalid attribute \"" + attr_name + "\" in element in pies.conf!"); - break; + if (attr_name == "type") { + type = attr_content; + break; } } ActionGroup group = GroupRegistry.create_group(type, pie.id); + group.on_load(slice); if (group != null) pie.add_group(group); } diff --git a/src/pies/save.vala b/src/pies/save.vala index 9760cce..efb3fb6 100644 --- a/src/pies/save.vala +++ b/src/pies/save.vala @@ -72,7 +72,7 @@ namespace Pies { } } else { writer.start_element("group"); - writer.write_attribute("type", GroupRegistry.descriptions[group.get_type().name()].id); + group.on_save(writer); writer.end_element(); slice_count += group.actions.size; -- cgit v1.2.3