diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-11-25 04:10:33 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-11-25 04:10:33 +0100 |
commit | 4a3f1fdfe1eb3743564adcee35d5513224339260 (patch) | |
tree | 1bcc97c9bd5abcf181b9f19294a0f187ff8af103 /src/library/OfflinePage.vala | |
parent | 7152401783578b56343f578b4ec920998660de33 (diff) |
New upstream version 0.25.1upstream/0.25.1
Diffstat (limited to 'src/library/OfflinePage.vala')
-rw-r--r-- | src/library/OfflinePage.vala | 29 |
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); } |