[gtk+/wip/attachment-parameters: 10/16] gtkwindow: use gtk_menu_popup_with_parameters ()
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/attachment-parameters: 10/16] gtkwindow: use gtk_menu_popup_with_parameters ()
- Date: Fri, 9 Oct 2015 22:37:48 +0000 (UTC)
commit 2081954973ff541cbf5509e3e38cfa618ed9cf3b
Author: William Hua <william hua canonical com>
Date: Wed Sep 23 11:47:07 2015 -0400
gtkwindow: use gtk_menu_popup_with_parameters ()
gtk/gtkwindow.c | 26 +++++++-------------------
1 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index efde842..b7d7405 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -8649,15 +8649,6 @@ popup_menu_detach (GtkWidget *widget,
}
static void
-popup_position_func (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer user_data)
-{
-}
-
-static void
close_window_clicked (GtkMenuItem *menuitem,
gpointer user_data)
{
@@ -8693,16 +8684,13 @@ gtk_window_do_popup_fallback (GtkWindow *window,
G_CALLBACK (close_window_clicked), window);
gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), menuitem);
- if (event)
- gtk_menu_popup (GTK_MENU (priv->popup_menu),
- NULL, NULL,
- NULL, NULL,
- event->button, event->time);
- else
- gtk_menu_popup (GTK_MENU (priv->popup_menu),
- NULL, NULL,
- popup_position_func, window,
- 0, gtk_get_current_event_time ());
+ gtk_menu_popup_with_parameters (GTK_MENU (priv->popup_menu),
+ NULL,
+ NULL,
+ NULL,
+ event ? event->button : 0,
+ event ? event->time : gtk_get_current_event_time (),
+ NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]