summaryrefslogtreecommitdiff
path: root/src/library/TrashPage.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:11:58 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:11:58 +0100
commitccff5442184e84d511c2bd25ed3da53e4336a272 (patch)
tree8402a0ba68852e0aec5841ed4519ccfe88352223 /src/library/TrashPage.vala
parenta1e1833f48ed618273dab9198b547148a89832a7 (diff)
parent4a3f1fdfe1eb3743564adcee35d5513224339260 (diff)
Merge tag 'upstream/0.25.1'
Upstream version 0.25.1
Diffstat (limited to 'src/library/TrashPage.vala')
-rw-r--r--src/library/TrashPage.vala35
1 files changed, 14 insertions, 21 deletions
diff --git a/src/library/TrashPage.vala b/src/library/TrashPage.vala
index 0a38ac0..943c5e1 100644
--- a/src/library/TrashPage.vala
+++ b/src/library/TrashPage.vala
@@ -28,9 +28,9 @@ public class TrashPage : CheckerboardPage {
public TrashPage() {
base (NAME);
- init_item_context_menu("/TrashContextMenu");
- init_page_context_menu("/TrashPageMenu");
- init_toolbar("/TrashToolbar");
+ init_item_context_menu("TrashContextMenu");
+ init_page_context_menu("TrashPageMenu");
+ init_toolbar("TrashToolbar");
tracker = new MediaViewTracker(get_view());
@@ -46,25 +46,18 @@ public class TrashPage : CheckerboardPage {
ui_filenames.add("trash.ui");
}
-
- protected override Gtk.ActionEntry[] init_collect_action_entries() {
- Gtk.ActionEntry[] actions = base.init_collect_action_entries();
-
- Gtk.ActionEntry delete_action = { "Delete", Resources.DELETE_LABEL, TRANSLATABLE, "Delete",
- TRANSLATABLE, on_delete };
- delete_action.label = Resources.DELETE_PHOTOS_MENU;
- delete_action.tooltip = Resources.DELETE_FROM_TRASH_TOOLTIP;
- actions += delete_action;
-
- Gtk.ActionEntry restore = { "Restore", Resources.UNDELETE_LABEL, TRANSLATABLE, null, TRANSLATABLE,
- on_restore };
- restore.label = Resources.RESTORE_PHOTOS_MENU;
- restore.tooltip = Resources.RESTORE_PHOTOS_TOOLTIP;
- actions += restore;
-
- return actions;
+
+ private const GLib.ActionEntry[] entries = {
+ { "Delete", on_delete },
+ { "Restore", on_restore }
+ };
+
+ protected override void add_actions () {
+ base.add_actions ();
+
+ AppWindow.get_instance ().add_action_entries (entries, this);
}
-
+
public override Core.ViewTracker? get_view_tracker() {
return tracker;
}