summaryrefslogtreecommitdiff
path: root/src/actionGroups/actionGroup.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-04 13:00:51 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-04 13:00:51 +0200
commit7556967bf57453d412a8f18633599f38806f8620 (patch)
treeb7403b6ac1b5cf5db9462c3ca6d52b973df24819 /src/actionGroups/actionGroup.vala
parent16fe2e5d0525422ba6ca5db9e92a93d17caae302 (diff)
Imported Upstream version 0.6.7upstream/0.6.7
Diffstat (limited to 'src/actionGroups/actionGroup.vala')
-rw-r--r--src/actionGroups/actionGroup.vala23
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;
}