[balsa/popover: 27/27] balsa-index: Change popup menu placement



commit 638da4c1bede26c6ed0ae238655eccd3ffa603d0
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu May 21 19:18:20 2020 -0400

    balsa-index: Change popup menu placement
    
    Pop up the context menu below the pointer instead of to its right.
    That's closer to the previous behavior.

 src/balsa-index.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 815afb8ab..47985059d 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -1998,7 +1998,7 @@ bndx_popup_menu_create(BalsaIndex * bindex)
 
     bindex->popup_menu = menu;
     bindex->popup_popover = gtk_popover_new_from_model(GTK_WIDGET(bindex), G_MENU_MODEL(menu));
-    gtk_popover_set_position(GTK_POPOVER(bindex->popup_popover), GTK_POS_RIGHT);
+    gtk_popover_set_position(GTK_POPOVER(bindex->popup_popover), GTK_POS_BOTTOM);
 }
 
 /* bndx_do_popup: common code for the popup menu;
@@ -2084,7 +2084,6 @@ bndx_do_popup(BalsaIndex * index, GdkEventButton * event)
     g_menu_insert_item(index->popup_menu, index->move_position, item);
     g_object_unref(item);
 
-    gtk_widget_get_allocation(GTK_WIDGET(index), &allocation);
     if (event != NULL && gdk_event_triggers_context_menu((GdkEvent *) event)) {
         /* Pop up to the right of the pointer */
         gtk_tree_view_convert_bin_window_to_widget_coords(GTK_TREE_VIEW(index),
@@ -2096,6 +2095,7 @@ bndx_do_popup(BalsaIndex * index, GdkEventButton * event)
         allocation.height = 0;
     } else {
         /* Pop up to the right of the "From" column */
+        gtk_widget_get_allocation(GTK_WIDGET(index), &allocation);
         allocation.width = balsa_app.index_num_width +
                            balsa_app.index_status_width +
                            balsa_app.index_attachment_width +


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