[shotwell/wip/dedeprecate: 61/64] wip



commit dfe3b6bea31bdd5ea461820f86ef28251450b9ba
Author: Jens Georg <mail jensge org>
Date:   Thu Nov 10 21:22:32 2016 +0100

    wip
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/library/TrashPage.vala        |   29 +++++++++++------------------
 src/searches/SavedSearchPage.vala |   15 +++++----------
 ui/trash.ui                       |    4 ++--
 3 files changed, 18 insertions(+), 30 deletions(-)
---
diff --git a/src/library/TrashPage.vala b/src/library/TrashPage.vala
index 60893b0..943c5e1 100644
--- a/src/library/TrashPage.vala
+++ b/src/library/TrashPage.vala
@@ -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;
     }
diff --git a/src/searches/SavedSearchPage.vala b/src/searches/SavedSearchPage.vala
index ae082c0..c57ec7d 100644
--- a/src/searches/SavedSearchPage.vala
+++ b/src/searches/SavedSearchPage.vala
@@ -31,7 +31,7 @@ public class SavedSearchPage : CollectionPage {
         foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all())
             get_view().monitor_source_collection(sources, new SavedSearchManager(this, search), null);
         
-        init_page_context_menu("/SearchContextMenu");
+        init_page_context_menu("SearchContextMenu");
     }
     
     protected override void get_config_photos_sort(out bool sort_order, out int sort_by) {
@@ -74,15 +74,10 @@ public class SavedSearchPage : CollectionPage {
     }
     
     protected override void update_actions(int selected_count, int count) {
-        set_action_details("RenameSearch",
-            Resources.RENAME_SEARCH_MENU,
-            null, true);
-        set_action_details("EditSearch",
-            Resources.EDIT_SEARCH_MENU,
-            null, true);
-        set_action_details("DeleteSearch",
-            Resources.DELETE_SEARCH_MENU,
-            null, true);
+        set_action_sensitive ("RenameSearch", true);
+        set_action_sensitive ("EditSearch", true);
+        set_action_sensitive ("DeleteSearch", true);
+
         base.update_actions(selected_count, count);
     }
 }
diff --git a/ui/trash.ui b/ui/trash.ui
index 3c63ac8..2e68df8 100644
--- a/ui/trash.ui
+++ b/ui/trash.ui
@@ -17,7 +17,7 @@
       <section>
         <item>
           <attribute name="label" translatable="yes">Show in File Mana_ger</attribute>
-          <attribute name="accel">&lt;Primary&gt;&lt;Shift&gt;q</attribute>
+          <attribute name="accel">&lt;Primary&gt;&lt;Shift&gt;m</attribute>
           <attribute name="action">win.CommonJumpToFile</attribute>
         </item>
         <item>
@@ -225,7 +225,7 @@
     <section>
       <item>
         <attribute name="label" translatable="yes">Show in File Mana_ger</attribute>
-        <attribute name="accel">&lt;Primary&gt;&lt;Shift&gt;q</attribute>
+        <attribute name="accel">&lt;Primary&gt;&lt;Shift&gt;m</attribute>
         <attribute name="action">win.CommonJumpToFile</attribute>
       </item>
     </section>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]