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/actionGroups/actionGroup.vala | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src/actionGroups/actionGroup.vala') diff --git a/src/actionGroups/actionGroup.vala b/src/actionGroups/actionGroup.vala index 8bbcde4..85488ad 100644 --- a/src/actionGroups/actionGroup.vala +++ b/src/actionGroups/actionGroup.vala @@ -55,6 +55,20 @@ public class ActionGroup : GLib.Object { public virtual void on_remove() {} + ///////////////////////////////////////////////////////////////////// + /// This one is called, when the ActionGroup is saved. + ///////////////////////////////////////////////////////////////////// + + public virtual void on_save(Xml.TextWriter writer) { + writer.write_attribute("type", GroupRegistry.descriptions[this.get_type().name()].id); + } + + ///////////////////////////////////////////////////////////////////// + /// This one is called, when the ActionGroup is loaded. + ///////////////////////////////////////////////////////////////////// + + public virtual void on_load(Xml.Node* data) {} + ///////////////////////////////////////////////////////////////////// /// Adds a new Action to the group. ///////////////////////////////////////////////////////////////////// @@ -76,8 +90,9 @@ public class ActionGroup : GLib.Object { ///////////////////////////////////////////////////////////////////// public void disable_quickactions() { - foreach (var action in actions) + foreach (var action in actions) { action.is_quickaction = false; + } } ///////////////////////////////////////////////////////////////////// @@ -85,9 +100,11 @@ public class ActionGroup : GLib.Object { ///////////////////////////////////////////////////////////////////// public bool has_quickaction() { - foreach (var action in actions) - if (action.is_quickaction) + foreach (var action in actions) { + if (action.is_quickaction) { return true; + } + } return false; } -- cgit v1.2.3