[gimp/gtk3-port: 274/440] app: use gtk_menu_popup_at_widget() in GimpIconPicker



commit 2e0fcf7aba3ab3406fc0bce453de53beff700b40
Author: Michael Natterer <mitch gimp org>
Date:   Tue May 1 23:42:48 2018 +0200

    app: use gtk_menu_popup_at_widget() in GimpIconPicker

 app/widgets/gimpiconpicker.c |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/app/widgets/gimpiconpicker.c b/app/widgets/gimpiconpicker.c
index b460838..8119d43 100644
--- a/app/widgets/gimpiconpicker.c
+++ b/app/widgets/gimpiconpicker.c
@@ -38,7 +38,6 @@
 #include "gimpiconpicker.h"
 #include "gimpview.h"
 #include "gimpviewablebutton.h"
-#include "gimpwidgets-utils.h"
 
 #include "gimp-intl.h"
 
@@ -555,16 +554,6 @@ gimp_icon_picker_menu_paste (GtkWidget      *widget,
 }
 
 static void
-gimp_icon_picker_menu_position (GtkMenu  *menu,
-                                gint     *x,
-                                gint     *y,
-                                gboolean *push_in,
-                                gpointer  user_data)
-{
-  gimp_button_menu_position (user_data, menu, GTK_POS_RIGHT, x, y);
-}
-
-static void
 gimp_icon_picker_clicked (GtkWidget      *widget,
                           GdkEventButton *event,
                           gpointer        object)
@@ -586,10 +575,11 @@ gimp_icon_picker_clicked (GtkWidget      *widget,
   else
     gtk_widget_set_sensitive (private->menu_item_copy, FALSE);
 
-  gtk_menu_popup (GTK_MENU (private->right_click_menu),
-                  NULL, NULL,
-                  gimp_icon_picker_menu_position, widget,
-                  event->button, event->time);
+  gtk_menu_popup_at_widget (GTK_MENU (private->right_click_menu),
+                            widget,
+                            GDK_GRAVITY_EAST,
+                            GDK_GRAVITY_NORTH_WEST,
+                            (GdkEvent *) event);
 }
 
 static void


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