summaryrefslogtreecommitdiff
path: root/src/library/OfflinePage.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/OfflinePage.vala
parenta1e1833f48ed618273dab9198b547148a89832a7 (diff)
parent4a3f1fdfe1eb3743564adcee35d5513224339260 (diff)
Merge tag 'upstream/0.25.1'
Upstream version 0.25.1
Diffstat (limited to 'src/library/OfflinePage.vala')
-rw-r--r--src/library/OfflinePage.vala29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/library/OfflinePage.vala b/src/library/OfflinePage.vala
index 899dc53..bd916d0 100644
--- a/src/library/OfflinePage.vala
+++ b/src/library/OfflinePage.vala
@@ -28,8 +28,8 @@ public class OfflinePage : CheckerboardPage {
public OfflinePage() {
base (NAME);
- init_item_context_menu("/OfflineContextMenu");
- init_toolbar("/OfflineToolbar");
+ init_item_context_menu("OfflineContextMenu");
+ init_toolbar("OfflineToolbar");
tracker = new MediaViewTracker(get_view());
@@ -51,27 +51,24 @@ public class OfflinePage : CheckerboardPage {
ui_filenames.add("offline.ui");
}
-
- protected override Gtk.ActionEntry[] init_collect_action_entries() {
- Gtk.ActionEntry[] actions = base.init_collect_action_entries();
-
- Gtk.ActionEntry remove = { "RemoveFromLibrary", Resources.REMOVE_LABEL, TRANSLATABLE, "Delete",
- TRANSLATABLE, on_remove_from_library };
- remove.label = Resources.REMOVE_FROM_LIBRARY_MENU;
- remove.tooltip = Resources.DELETE_FROM_LIBRARY_TOOLTIP;
- actions += remove;
-
- return actions;
+
+ private const GLib.ActionEntry[] entries = {
+ { "RemoveFromLibrary", on_remove_from_library }
+ };
+
+ 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;
}
protected override void update_actions(int selected_count, int count) {
set_action_sensitive("RemoveFromLibrary", selected_count > 0);
- set_action_important("RemoveFromLibrary", true);
-
+
base.update_actions(selected_count, count);
}