summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Pandelea <alexandru.pandelea@gmail.com>2017-03-08 23:46:24 +0200
committerAlexandru Pandelea <alexandru.pandelea@gmail.com>2017-03-09 12:15:32 +0200
commiteff346505bb6dd9654fa6bb8c0e92a3642d0b5db (patch)
treeb7487aeb0a3f61196d56ed3827be67cfd7ddbe2e /src
parent273e6efce2538298d5ae3e55b92f31bde189c0cd (diff)
downloadnautilus-eff346505bb6dd9654fa6bb8c0e92a3642d0b5db.tar.gz
use gtk_menu_popup_at_pointer
Since gtk_menu_popup is deprecated, use gtk_menu_popup instead. https://bugzilla.gnome.org/show_bug.cgi?id=779775
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-dnd.c4
-rw-r--r--src/nautilus-window.c21
2 files changed, 4 insertions, 21 deletions
diff --git a/src/nautilus-dnd.c b/src/nautilus-dnd.c
index 733811e82..4b1d016d0 100644
--- a/src/nautilus-dnd.c
+++ b/src/nautilus-dnd.c
@@ -889,8 +889,8 @@ nautilus_drag_drop_action_ask (GtkWidget *widget,
gtk_grab_add (menu);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
- NULL, NULL, 0, GDK_CURRENT_TIME);
+ gtk_menu_popup_at_pointer (GTK_MENU (menu),
+ NULL);
g_main_loop_run (damd.loop);
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 2fb2a9cda..99bd9d508 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1838,7 +1838,6 @@ notebook_popup_menu_show (NautilusWindow *window,
{
GtkWidget *popup;
GtkWidget *item;
- int button, event_time;
gboolean can_move_left, can_move_right;
NautilusNotebook *notebook;
@@ -1886,24 +1885,8 @@ notebook_popup_menu_show (NautilusWindow *window,
gtk_widget_show_all (popup);
- if (event)
- {
- button = event->button;
- event_time = event->time;
- }
- else
- {
- button = 0;
- event_time = gtk_get_current_event_time ();
- }
-
- /* TODO is this correct? */
- gtk_menu_attach_to_widget (GTK_MENU (popup),
- window->priv->notebook,
- NULL);
-
- gtk_menu_popup (GTK_MENU (popup), NULL, NULL, NULL, NULL,
- button, event_time);
+ gtk_menu_popup_at_pointer (GTK_MENU (popup),
+ (GdkEvent*) event);
}
/* emitted when the user clicks the "close" button of tabs */