mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-13 13:01:25 +00:00
general: use gtk_menu_popup_at_pointer
Since gtk_menu_popup is deprecated, use gtk_menu_popup_at_poiner instead. https://bugzilla.gnome.org/show_bug.cgi?id=779775
This commit is contained in:
parent
cff57aa144
commit
bb17f89256
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue