summaryrefslogtreecommitdiff
path: root/src/events/EventsDirectoryPage.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/events/EventsDirectoryPage.vala')
-rw-r--r--src/events/EventsDirectoryPage.vala13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/events/EventsDirectoryPage.vala b/src/events/EventsDirectoryPage.vala
index af20d99..4650fd2 100644
--- a/src/events/EventsDirectoryPage.vala
+++ b/src/events/EventsDirectoryPage.vala
@@ -114,14 +114,21 @@ public abstract class EventsDirectoryPage : CheckerboardPage {
{ "ViewComment", on_action_toggle, null, "false", on_display_comments }
};
- protected override void add_actions () {
- base.add_actions ();
- AppWindow.get_instance ().add_action_entries (entries, this);
+ protected override void add_actions (GLib.ActionMap map) {
+ base.add_actions (map);
+ map.add_action_entries (entries, this);
var display_comments = Config.Facade.get_instance().get_display_event_comments();
get_action ("ViewComment").change_state (display_comments);
}
+ protected override void remove_actions(GLib.ActionMap map) {
+ base.remove_actions(map);
+ foreach (var entry in entries) {
+ map.remove_action(entry.name);
+ }
+ }
+
protected override void init_actions(int selected_count, int count) {
base.init_actions(selected_count, count);