[balsa/popover: 29/29] balsa-index: Change popup menu placement
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/popover: 29/29] balsa-index: Change popup menu placement
- Date: Sun, 31 May 2020 21:18:09 +0000 (UTC)
commit e99f188460e19c92247dd759be364a03c30a7667
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 833d4f394..df3531257 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -2017,7 +2017,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;
@@ -2103,7 +2103,6 @@ bndx_do_popup(BalsaIndex * index)
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),
@@ -2115,6 +2114,7 @@ bndx_do_popup(BalsaIndex * index)
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]