[shotwell/wip/gtk4: 5/45] Shows some images




commit a5ef94bfb5d1e90b4dda8e507141e45ebc88184d
Author: Jens Georg <mail jensge org>
Date:   Sun Apr 3 19:38:34 2022 +0200

    Shows some images

 data/ui/collection.ui          | 78 +++++++++++++-----------------------------
 data/ui/message_pane.ui        | 23 ++-----------
 src/library/LibraryBranch.vala | 30 +++++++++-------
 src/library/LibraryWindow.vala | 16 ++++-----
 src/meson.build                |  8 ++++-
 src/sidebar/Entry.vala         |  2 ++
 src/sidebar/Tree.vala          | 44 ++++++++++++++++--------
 src/sidebar/common.vala        |  4 +--
 8 files changed, 92 insertions(+), 113 deletions(-)
---
diff --git a/data/ui/collection.ui b/data/ui/collection.ui
index c12c407a..fc058795 100644
--- a/data/ui/collection.ui
+++ b/data/ui/collection.ui
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
 <interface domain="shotwell">
-  <requires lib="gtk+" version="3.18"/>
+  <requires lib="gtk" version="4.0"/>
   <menu id="CollectionContextMenu">
     <section>
       <item>
@@ -137,91 +136,62 @@
       </item>
     </section>
   </menu>
-  <object class="GtkToolbar" id="CollectionToolbar">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="toolbar_style">both-horiz</property>
+  <object class="GtkBox" id="CollectionToolbar">
+    <style>
+      <class name="toolbar"/>
+    </style>
+    <property name="can_focus">0</property>
     <child>
-      <object class="GtkToolButton" id="ToolRotate">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
+      <object class="GtkButton" id="ToolRotate">
+        <property name="can_focus">0</property>
         <property name="tooltip_text" translatable="yes">Rotate the photos right (press Ctrl to rotate 
left)</property>
-        <property name="is_important">True</property>
         <property name="action_name">win.RotateClockwise</property>
         <property name="label" translatable="yes">Rotate</property>
-        <property name="use_underline">True</property>
+        <property name="use_underline">1</property>
         <property name="icon_name">object-rotate-right-symbolic</property>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="homogeneous">True</property>
-      </packing>
     </child>
     <child>
-      <object class="GtkToolButton" id="ToolEnhance">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
+      <object class="GtkButton" id="ToolEnhance">
+        <property name="can_focus">0</property>
         <property name="tooltip_text" translatable="yes">Automatically improve the photo’s 
appearance</property>
-        <property name="is_important">True</property>
         <property name="action_name">win.Enhance</property>
         <property name="label" translatable="yes">Enhance</property>
-        <property name="use_underline">True</property>
+        <property name="use_underline">1</property>
         <property name="icon_name">image-auto-adjust-symbolic</property>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="homogeneous">True</property>
-      </packing>
     </child>
     <child>
-      <object class="GtkSeparatorToolItem">
-        <property name="can_focus">False</property>
+      <object class="GtkSeparator">
+        <property name="orientation">vertical</property>
+        <property name="can_focus">0</property>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="homogeneous">False</property>
-      </packing>
     </child>
     <child>
-      <object class="GtkToolButton" id="ToolPublish">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
+      <object class="GtkButton" id="ToolPublish">
+        <property name="can_focus">0</property>
         <property name="tooltip_text" translatable="yes">Publish to various websites</property>
-        <property name="is_important">True</property>
         <property name="action_name">win.Publish</property>
         <property name="label" translatable="yes">Publish</property>
-        <property name="use_underline">True</property>
+        <property name="use_underline">1</property>
         <property name="icon_name">send-to-symbolic</property>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="homogeneous">True</property>
-      </packing>
     </child>
     <child>
-      <object class="GtkSeparatorToolItem">
-        <property name="can_focus">False</property>
+      <object class="GtkSeparator">
+        <property name="orientation">vertical</property>
+        <property name="can_focus">0</property>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="homogeneous">False</property>
-      </packing>
     </child>
     <child>
-      <object class="GtkToggleToolButton" id="ToolFind">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
+      <object class="GtkToggleButton" id="ToolFind">
+        <property name="can_focus">0</property>
         <property name="tooltip_text" translatable="yes">Find an image by typing text that appears in its 
name or tags</property>
-        <property name="is_important">True</property>
         <property name="action_name">win.CommonDisplaySearchbar</property>
         <property name="label" translatable="yes">Find</property>
-        <property name="use_underline">True</property>
+        <property name="use_underline">1</property>
         <property name="icon_name">edit-find-symbolic</property>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="homogeneous">True</property>
-      </packing>
     </child>
   </object>
 </interface>
diff --git a/data/ui/message_pane.ui b/data/ui/message_pane.ui
index 165a01ff..910a3b09 100644
--- a/data/ui/message_pane.ui
+++ b/data/ui/message_pane.ui
@@ -1,44 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
 <interface>
-  <requires lib="gtk+" version="3.22"/>
+  <requires lib="gtk" version="4.0"/>
   <template class="PageMessagePane" parent="GtkBox">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
     <property name="valign">center</property>
     <property name="margin_top">12</property>
     <property name="margin_bottom">12</property>
     <property name="orientation">vertical</property>
     <child>
       <object class="GtkImage" id="icon_image">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
+        <property name="valign">center</property>
         <property name="halign">center</property>
         <property name="margin_bottom">12</property>
         <property name="pixel_size">128</property>
         <property name="icon_name">image-x-generic-symbolic</property>
-        <property name="icon_size">0</property>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
-        <property name="position">0</property>
-      </packing>
     </child>
     <child>
       <object class="GtkLabel" id="label">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="label" translatable="no">label</property>
         <attributes>
-          <attribute name="scale" value="1.3999999999999999"/>
+          <attribute name="scale" value="1.3999999999999999"></attribute>
         </attributes>
       </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="position">1</property>
-      </packing>
     </child>
     <style>
       <class name="dim-label"/>
diff --git a/src/library/LibraryBranch.vala b/src/library/LibraryBranch.vala
index 622162e3..e25a183d 100644
--- a/src/library/LibraryBranch.vala
+++ b/src/library/LibraryBranch.vala
@@ -8,11 +8,13 @@ public class Library.Branch : Sidebar.Branch {
     private const string POSITION_DATA = "x-photos-entry-position";
 
     public Library.PhotosEntry photos_entry { get; private set; }
+    #if 0
     public Library.FlaggedSidebarEntry flagged_entry { get; private set; }
     public Library.LastImportSidebarEntry last_imported_entry { get; private set; }
     public Library.ImportQueueSidebarEntry import_queue_entry { get; private set; }
     public Library.OfflineSidebarEntry offline_entry { get; private set; }
     public Library.TrashSidebarEntry trash_entry { get; private set; }
+    #endif
     
     // This lists the order of the library items in the sidebar. To re-order, simply move
     // the item in this list to a new position. These numbers should *not* persist anywhere
@@ -31,26 +33,28 @@ public class Library.Branch : Sidebar.Branch {
             Sidebar.Branch.Options.STARTUP_OPEN_GROUPING, comparator);
 
         photos_entry = new Library.PhotosEntry();
+        #if 0
         trash_entry = new Library.TrashSidebarEntry();
         last_imported_entry = new Library.LastImportSidebarEntry();
         flagged_entry = new Library.FlaggedSidebarEntry();
         offline_entry = new Library.OfflineSidebarEntry();
         import_queue_entry = new Library.ImportQueueSidebarEntry();
+        #endif
 
         insert(photos_entry, EntryPosition.PHOTOS);
-        insert(trash_entry, EntryPosition.TRASH);
+        //insert(trash_entry, EntryPosition.TRASH);
 
-        flagged_entry.visibility_changed.connect(on_flagged_visibility_changed);
-        on_flagged_visibility_changed();
+        //flagged_entry.visibility_changed.connect(on_flagged_visibility_changed);
+        //on_flagged_visibility_changed();
 
-        last_imported_entry.visibility_changed.connect(on_last_imported_visibility_changed);
-        on_last_imported_visibility_changed();
+        //last_imported_entry.visibility_changed.connect(on_last_imported_visibility_changed);
+        //on_last_imported_visibility_changed();
 
-        import_queue_entry.visibility_changed.connect(on_import_queue_visibility_changed);
-        on_import_queue_visibility_changed();
+        //import_queue_entry.visibility_changed.connect(on_import_queue_visibility_changed);
+        //on_import_queue_visibility_changed();
 
-        offline_entry.visibility_changed.connect(on_offline_visibility_changed);
-        on_offline_visibility_changed();
+        //offline_entry.visibility_changed.connect(on_offline_visibility_changed);
+        //on_offline_visibility_changed();
     }
     
     private void insert(Sidebar.Entry entry, int position) {
@@ -59,19 +63,19 @@ public class Library.Branch : Sidebar.Branch {
     }
 
     private void on_flagged_visibility_changed() {
-        update_entry_visibility(flagged_entry, EntryPosition.FLAGGED);
+        //update_entry_visibility(flagged_entry, EntryPosition.FLAGGED);
     }
 
     private void on_last_imported_visibility_changed() {
-        update_entry_visibility(last_imported_entry, EntryPosition.LAST_IMPORTED);
+        //update_entry_visibility(last_imported_entry, EntryPosition.LAST_IMPORTED);
     }
 
     private void on_import_queue_visibility_changed() {
-        update_entry_visibility(import_queue_entry, EntryPosition.IMPORT_QUEUE);
+        //update_entry_visibility(import_queue_entry, EntryPosition.IMPORT_QUEUE);
     }
 
     private void on_offline_visibility_changed() {
-        update_entry_visibility(offline_entry, EntryPosition.OFFLINE);
+        //update_entry_visibility(offline_entry, EntryPosition.OFFLINE);
     }
 
     private void update_entry_visibility(Library.HideablePageEntry entry, int position) {
diff --git a/src/library/LibraryWindow.vala b/src/library/LibraryWindow.vala
index 88eaa1df..46205cee 100644
--- a/src/library/LibraryWindow.vala
+++ b/src/library/LibraryWindow.vala
@@ -105,9 +105,9 @@ public class LibraryWindow : AppWindow {
     private bool notify_library_is_home_dir = true;
     
     // Sidebar tree and roots (ordered by SidebarRootPosition)
-#if DOES_NOT_WORK_WITH_GTK4
     private Sidebar.Tree sidebar_tree;
     private Library.Branch library_branch = new Library.Branch();
+#if DOES_NOT_WORK_WITH_GTK4
     private Tags.Branch tags_branch = new Tags.Branch();
     private Folders.Branch folders_branch = new Folders.Branch();
     private Faces.Branch faces_branch = new Faces.Branch();
@@ -116,8 +116,8 @@ public class LibraryWindow : AppWindow {
     private Searches.Branch saved_search_branch = new Searches.Branch();
     private ImportRoll.Branch import_roll_branch = new ImportRoll.Branch();
     
-    private Gee.HashMap<Page, Sidebar.Entry> page_map = new Gee.HashMap<Page, Sidebar.Entry>();
 #endif
+    private Gee.HashMap<Page, Sidebar.Entry> page_map = new Gee.HashMap<Page, Sidebar.Entry>();
     private bool page_switching_enabled = true;
     
     private LibraryPhotoPage photo_page = null;
@@ -152,9 +152,7 @@ public class LibraryWindow : AppWindow {
         base();
 
         // prep sidebar and add roots
-        #if 0
-        sidebar_tree = new Sidebar.Tree(DND_TARGET_ENTRIES, Gdk.DragAction.ASK,
-            external_drop_handler);
+        sidebar_tree = new Sidebar.Tree();
         
         sidebar_tree.page_created.connect(on_page_created);
         sidebar_tree.destroying_page.connect(on_destroying_page);
@@ -162,6 +160,7 @@ public class LibraryWindow : AppWindow {
         sidebar_tree.selected_entry_removed.connect(on_sidebar_selected_entry_removed);
         
         sidebar_tree.graft(library_branch, SidebarRootPosition.LIBRARY);
+        #if 0
         sidebar_tree.graft(tags_branch, SidebarRootPosition.TAGS);
         sidebar_tree.graft(folders_branch, SidebarRootPosition.FOLDERS);
 #if ENABLE_FACES   
@@ -183,7 +182,7 @@ public class LibraryWindow : AppWindow {
 
         // create the main layout & start at the Library page
         basic_properties = new BasicProperties();
-        //create_layout(library_branch.photos_entry.get_page());
+        create_layout(library_branch.photos_entry.get_page());
         
         // settings that should persist between sessions
         load_configuration();
@@ -1267,7 +1266,6 @@ public class LibraryWindow : AppWindow {
         }
     }
     
-    #if 0
     private void on_page_created(Sidebar.PageRepresentative entry, Page page) {
         assert(!page_map.has_key(page));
         page_map.set(page, entry);
@@ -1295,7 +1293,7 @@ public class LibraryWindow : AppWindow {
     private void on_sidebar_selected_entry_removed(Sidebar.SelectableEntry selectable) {
         // if the currently selected item is removed, want to jump to fallback page (which
         // depends on the item that was selected)
-        
+        #if 0
         Library.LastImportSidebarEntry last_import_entry = library_branch.last_imported_entry;
         
         // Importing... -> Last Import (if available)
@@ -1318,11 +1316,11 @@ public class LibraryWindow : AppWindow {
             
             return;
         }
+        #endif
         
         // basic all-around default: jump to the Library page
         switch_to_page(library_branch.photos_entry.get_page());
     }
-    #endif
     
     private void subscribe_for_basic_information(Page page) {
         ViewCollection view = page.get_view();
diff --git a/src/meson.build b/src/meson.build
index 77eca629..60ea4049 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -91,8 +91,14 @@ executable(
         'publishing/PublishingUI.vala',
         'publishing/PublishingPluginHost.vala',
         'publishing/APIGlue.vala',
-            'library/BackgroundProgressBar.vala',
+        'sidebar/Branch.vala',
+        'sidebar/Sidebar.vala',
+        'sidebar/common.vala',
+        'sidebar/Entry.vala',
+        'sidebar/Tree.vala',
+        'library/BackgroundProgressBar.vala',
         'library/Library.vala',
+        'library/LibraryBranch.vala',
         'library/LibraryWindow.vala',
         'library/FlaggedPage.vala',
         'library/ImportQueuePage.vala',
diff --git a/src/sidebar/Entry.vala b/src/sidebar/Entry.vala
index b2740fac..45726057 100644
--- a/src/sidebar/Entry.vala
+++ b/src/sidebar/Entry.vala
@@ -70,6 +70,8 @@ public interface Sidebar.InternalDropTargetEntry : Sidebar.Entry {
     #endif
 }
 
+#if 0
 public interface Sidebar.InternalDragSourceEntry : Sidebar.Entry {
     public abstract void prepare_selection_data(Gtk.SelectionData data);
 }
+#endif
diff --git a/src/sidebar/Tree.vala b/src/sidebar/Tree.vala
index b07af779..abc02ea4 100644
--- a/src/sidebar/Tree.vala
+++ b/src/sidebar/Tree.vala
@@ -9,8 +9,8 @@ public class Sidebar.Tree : Gtk.TreeView {
     
     // Only one ExternalDropHandler can be registered with the Tree; it's responsible for completing
     // the "drag-data-received" signal properly.
-    public delegate void ExternalDropHandler(Gdk.DragContext context, Sidebar.Entry? entry,
-        Gtk.SelectionData data, uint info, uint time);
+//    public delegate void ExternalDropHandler(Gdk.DragContext context, Sidebar.Entry? entry,
+//        Gtk.SelectionData data, uint info, uint time);
     
     private class EntryWrapper : Object {
         public Sidebar.Entry entry;
@@ -61,7 +61,7 @@ public class Sidebar.Tree : Gtk.TreeView {
     
     private Gtk.Builder builder = new Gtk.Builder ();
     private Gtk.CellRendererText text_renderer;
-    private unowned ExternalDropHandler drop_handler;
+    //private unowned ExternalDropHandler drop_handler;
     private Gtk.Entry? text_entry = null;
     private Gee.HashMap<Sidebar.Entry, EntryWrapper> entry_map =
         new Gee.HashMap<Sidebar.Entry, EntryWrapper>();
@@ -69,7 +69,7 @@ public class Sidebar.Tree : Gtk.TreeView {
     private int editing_disabled = 0;
     private bool mask_entry_selected_signal = false;
     private weak EntryWrapper? selected_wrapper = null;
-    private Gtk.Menu? default_context_menu = null;
+    private Gtk.PopoverMenu? default_context_menu = null;
     private bool expander_called_manually = false;
     private int expander_special_count = 0;
     private bool is_internal_drag_in_progress = false;
@@ -90,8 +90,7 @@ public class Sidebar.Tree : Gtk.TreeView {
     
     public signal void destroying_page(Sidebar.PageRepresentative entry, Page page);
     
-    public Tree(Gdk.ContentFormats[] target_entries, Gdk.DragAction actions,
-        ExternalDropHandler drop_handler) {
+    public Tree() {
         set_model(store);
         
         Gtk.TreeViewColumn text_column = new Gtk.TreeViewColumn();
@@ -133,22 +132,26 @@ public class Sidebar.Tree : Gtk.TreeView {
         // It Would Be Nice if the target entries and actions were gleaned by querying each 
         // Sidebar.Entry as it was added, but that's a tad too complicated for our needs
         // currently
-        enable_model_drag_dest(target_entries, actions);
+        //enable_model_drag_dest(target_entries, actions);
 
+        #if 0
         Gtk.TargetEntry[] source_entries = new Gtk.TargetEntry[0];
         source_entries += target_entries[LibraryWindow.TargetType.TAG_PATH];
         enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK, source_entries,
             Gdk.DragAction.COPY);
 
         this.drop_handler = drop_handler;
+        #endif
         
-        popup_menu.connect(on_context_menu_keypress);
+        //popup_menu.connect(on_context_menu_keypress);
         
         setup_default_context_menu();
         
+        #if 0
         drag_begin.connect(on_drag_begin);
         drag_end.connect(on_drag_end);
         drag_motion.connect(on_drag_motion);
+        #endif
     }
     
     ~Tree() {
@@ -164,6 +167,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         renderer.visible = !(wrapper.entry is Sidebar.Header);
     }
     
+    #if 0
     private void on_drag_begin(Gdk.DragContext ctx) {
         is_internal_drag_in_progress = true;
     }
@@ -188,6 +192,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         
         return false;
     }
+    #endif
 
     private const GLib.ActionEntry[] entries = {
         { "tag.new", on_new_tag },
@@ -198,11 +203,10 @@ public class Sidebar.Tree : Gtk.TreeView {
         try {
             this.builder.add_from_resource(Resources.get_ui("sidebar_default_context.ui"));
             var model = builder.get_object ("popup-menu") as GLib.MenuModel;
-            this.default_context_menu = new Gtk.Menu.from_model (model);
+            this.default_context_menu = new Gtk.PopoverMenu.from_model (model);
             var group = new GLib.SimpleActionGroup ();
             group.add_action_entries (entries, this);
             this.insert_action_group ("sidebar", group);
-            this.default_context_menu.attach_to_widget (this, null);
         } catch (Error error) {
             AppWindow.error_message("Error loading UI resource: %s".printf(
                 error.message));
@@ -797,6 +801,8 @@ public class Sidebar.Tree : Gtk.TreeView {
         return (wrapper != null) ? (wrapper.entry is Sidebar.SelectableEntry) : false;
     }
     
+
+    #if 0
     private Gtk.TreePath? get_path_from_event(Gdk.EventButton event) {
         int x, y;
         Gdk.ModifierType mask;
@@ -807,6 +813,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         Gtk.TreePath path;
         return get_path_at_pos(x, y, out path, null, out cell_x, out cell_y) ? path : null;
     }
+    #endif
     
     private Gtk.TreePath? get_current_path() {
         Gtk.TreeModel model;
@@ -827,9 +834,11 @@ public class Sidebar.Tree : Gtk.TreeView {
         
         scroll_to_cell(path, null, false, 0, 0);
         
-        return popup_context_menu(path);
+        //return popup_context_menu(path);
+        return false;
     }
     
+    #if 0
     private bool popup_context_menu(Gtk.TreePath path, Gdk.EventButton? event = null) {
         EntryWrapper? wrapper = get_wrapper_at_path(path);
         if (wrapper == null)
@@ -861,6 +870,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         default_context_menu.popup_at_pointer(event);
         return true;
     }
+    #endif
     
     public bool on_toggle_row(Gtk.TreeIter iter, Gtk.TreePath path) {
         // Determine whether to allow the row to toggle
@@ -898,6 +908,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         return true;
     }
     
+    #if 0
     public override bool button_press_event(Gdk.EventButton event) {
         Gtk.TreePath? path = get_path_from_event(event);
 
@@ -989,6 +1000,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         
         return base.key_press_event(event);
     }
+    #endif
     
     public bool rename_entry_in_place(Sidebar.Entry entry) {
         if (!expand_to_entry(entry))
@@ -1024,6 +1036,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         return true;
     }
 
+#if 0
     public override void drag_data_get(Gdk.DragContext context, Gtk.SelectionData selection_data,
         uint info, uint time) {
         InternalDragSourceEntry? drag_source = null;
@@ -1125,6 +1138,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         
         return has_dest;
     }
+    #endif
     
     // Returns true if path is renameable, and selects the path as well.
     private bool can_rename_path(Gtk.TreePath path) {
@@ -1165,7 +1179,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         if (editable is Gtk.Entry) {
             text_entry = (Gtk.Entry) editable;
             text_entry.editing_done.connect(on_editing_done);
-            text_entry.focus_out_event.connect(on_editing_focus_out);
+            //text_entry.focus_out_event.connect(on_editing_focus_out);
             text_entry.editable = true;
         }
     }
@@ -1174,7 +1188,7 @@ public class Sidebar.Tree : Gtk.TreeView {
         text_entry.editable = false;
         
         text_entry.editing_done.disconnect(on_editing_done);
-        text_entry.focus_out_event.disconnect(on_editing_focus_out);
+        //text_entry.focus_out_event.disconnect(on_editing_focus_out);
     }
     
     private void on_editing_done() {
@@ -1188,15 +1202,17 @@ public class Sidebar.Tree : Gtk.TreeView {
         }
         
         text_entry.editing_done.disconnect(on_editing_done);
-        text_entry.focus_out_event.disconnect(on_editing_focus_out);
+        //text_entry.focus_out_event.disconnect(on_editing_focus_out);
     }
 
+#if 0
     private bool on_editing_focus_out(Gdk.EventFocus event) {
         // We'll return false here, in case other parts of the app
         // want to know if the button press event that caused
         // us to lose focus have been fully handled.
         return false;
     }
+    #endif
     
     private void on_new_search() {
         (new SavedSearchDialog()).show();
diff --git a/src/sidebar/common.vala b/src/sidebar/common.vala
index ebdba518..511d13ff 100644
--- a/src/sidebar/common.vala
+++ b/src/sidebar/common.vala
@@ -91,7 +91,7 @@ public abstract class Sidebar.SimplePageEntry : Object, Sidebar.Entry, Sidebar.S
         page = null;
     }
     
-    public Gtk.Menu? get_sidebar_context_menu(Gdk.EventButton? event) {
+    public Gtk.PopoverMenu? get_sidebar_context_menu() {
         return get_page().get_page_context_menu();
     }
 }
@@ -129,6 +129,6 @@ public class Sidebar.Header : Sidebar.Grouping, Sidebar.EmphasizableEntry {
 
 public interface Sidebar.Contextable : Object {
     // Return null if the context menu should not be invoked for this event
-    public abstract Gtk.Menu? get_sidebar_context_menu(Gdk.EventButton? event);
+    public abstract Gtk.PopoverMenu? get_sidebar_context_menu();
 }
 


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