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:10:33 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:10:33 +0100
commit4a3f1fdfe1eb3743564adcee35d5513224339260 (patch)
tree1bcc97c9bd5abcf181b9f19294a0f187ff8af103 /src/library/TrashPage.vala
parent7152401783578b56343f578b4ec920998660de33 (diff)
New upstream version 0.25.1upstream/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;
}