[gimp/soc-2010-cage] app: add back the code that aligns the menu with the menu button
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2010-cage] app: add back the code that aligns the menu with the menu button
- Date: Wed, 30 Jun 2010 22:08:22 +0000 (UTC)
commit 0e6f62c19cf0cbdfcdbcd02060a30cf488235007
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]