summaryrefslogtreecommitdiff
path: root/src/actionGroups/actionGroup.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-18 15:42:59 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-18 15:42:59 +0200
commit84a27086bbd9f493128b354300f9c77ccb32a56b (patch)
tree977cb323f0ac6953f10bc20d84f45ebd5a6d4535 /src/actionGroups/actionGroup.vala
parentb683ce2789d95b2e9f221e75adc30efd91cfb901 (diff)
Imported Upstream version 0.6.0upstream/0.6.0
Diffstat (limited to 'src/actionGroups/actionGroup.vala')
-rw-r--r--src/actionGroups/actionGroup.vala68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/actionGroups/actionGroup.vala b/src/actionGroups/actionGroup.vala
index c54be2f..8bbcde4 100644
--- a/src/actionGroups/actionGroup.vala
+++ b/src/actionGroups/actionGroup.vala
@@ -1,23 +1,23 @@
-/*
-Copyright (c) 2011 by Simon Schneegans
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the Free
-Software Foundation, either version 3 of the License, or (at your option)
-any later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-more details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+/////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2011-2015 by Simon Schneegans
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or (at
+// your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////
namespace GnomePie {
-/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
// A base class storing a set of Actions. Derived classes may define
// how these Actions are created. This base class serves for custom
// actions, defined by the user.
@@ -28,67 +28,67 @@ public class ActionGroup : GLib.Object {
/////////////////////////////////////////////////////////////////////
/// A list of all stored actions.
/////////////////////////////////////////////////////////////////////
-
+
public Gee.ArrayList<Action?> actions { get; private set; }
-
+
/////////////////////////////////////////////////////////////////////
/// The ID of the pie to which this group is attached.
/////////////////////////////////////////////////////////////////////
-
+
public string parent_id { get; construct set; }
-
+
/////////////////////////////////////////////////////////////////////
/// C'tor, initializes all members.
/////////////////////////////////////////////////////////////////////
-
+
public ActionGroup(string parent_id) {
GLib.Object(parent_id : parent_id);
}
-
+
construct {
this.actions = new Gee.ArrayList<Action?>();
}
-
+
/////////////////////////////////////////////////////////////////////
/// This one is called, when the ActionGroup is deleted.
/////////////////////////////////////////////////////////////////////
-
+
public virtual void on_remove() {}
-
+
/////////////////////////////////////////////////////////////////////
/// Adds a new Action to the group.
/////////////////////////////////////////////////////////////////////
-
+
public void add_action(Action new_action) {
this.actions.add(new_action);
}
-
+
/////////////////////////////////////////////////////////////////////
/// Removes all Actions from the group.
/////////////////////////////////////////////////////////////////////
-
+
public void delete_all() {
actions.clear();
}
-
+
/////////////////////////////////////////////////////////////////////
/// Makes all contained Slices no Quick Actions.
/////////////////////////////////////////////////////////////////////
-
+
public void disable_quickactions() {
foreach (var action in actions)
action.is_quickaction = false;
}
-
+
/////////////////////////////////////////////////////////////////////
/// Returns true, if one o the contained Slices is a Quick Action
/////////////////////////////////////////////////////////////////////
-
+
public bool has_quickaction() {
foreach (var action in actions)
if (action.is_quickaction)
return true;
-
+
return false;
}
}