[gimp] app: add back the code that aligns the menu with the menu button



commit c1f63290bc1ef10c089148620e02a8b8ce0492a3
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jun 12 11:38:15 2010 +0200

    app: add back the code that aligns the menu with the menu button

 app/widgets/gimpdockbook.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c
index 6007cb7..52836f0 100644
--- a/app/widgets/gimpdockbook.c
+++ b/app/widgets/gimpdockbook.c
@@ -451,6 +451,17 @@ gimp_dockbook_menu_button_press (GimpDockbook   *dockbook,
   return handled;
 }
 
+static void
+gimp_dockbook_menu_position (GtkMenu  *menu,
+                             gint     *x,
+                             gint     *y,
+                             gpointer  data)
+{
+  GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
+
+  gimp_button_menu_position (dockbook->p->menu_button, menu, GTK_POS_LEFT, x, y);
+}
+
 static gboolean
 gimp_dockbook_show_menu (GimpDockbook *dockbook)
 {
@@ -574,7 +585,7 @@ gimp_dockbook_show_menu (GimpDockbook *dockbook)
   gimp_ui_manager_update (dockbook_ui_manager, dockable);
   gimp_ui_manager_ui_popup (dockbook_ui_manager, "/dockable-popup",
                             GTK_WIDGET (dockable),
-                            NULL, dockable,
+                            gimp_dockbook_menu_position, dockbook,
                             (GDestroyNotify) gimp_dockbook_menu_end, dockable);
 
   return TRUE;



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