diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-10-04 13:00:55 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-10-04 13:00:55 +0200 |
commit | e9b06dcd5df3f22bc3a7acd5c57a4bfdf4ef38f5 (patch) | |
tree | 6e9494073395f49fb3eec61d2c5ae40f5f3de2af /src/actionGroups/actionGroup.vala | |
parent | 19fe9cfe9a84ba453271d8d8e32f4aa9fe2be14e (diff) | |
parent | 7556967bf57453d412a8f18633599f38806f8620 (diff) |
Merge tag 'upstream/0.6.7'
Upstream version 0.6.7
Diffstat (limited to 'src/actionGroups/actionGroup.vala')
-rw-r--r-- | src/actionGroups/actionGroup.vala | 23 |
1 files changed, 20 insertions, 3 deletions
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 @@ -56,6 +56,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; } |