From c1e7916d178c8d7bb80c71d9e3ffb4aad5d1ef1c Mon Sep 17 00:00:00 2001 From: raveit65 Date: Thu, 27 Apr 2017 10:04:54 +0200 Subject: EomThumbView: Replace deprecated gtk_menu_popup function --- src/eom-thumb-view.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/eom-thumb-view.c b/src/eom-thumb-view.c index 93f4630..f1d5e36 100644 --- a/src/eom-thumb-view.c +++ b/src/eom-thumb-view.c @@ -1064,19 +1064,14 @@ eom_thumb_view_set_thumbnail_popup (EomThumbView *thumbview, static void eom_thumb_view_popup_menu (EomThumbView *thumbview, GdkEventButton *event) { - GtkWidget *popup; - int button, event_time; - - popup = thumbview->priv->menu; - - if (event) { - button = event->button; - event_time = event->time; - } else { - button = 0; - event_time = gtk_get_current_event_time (); - } - - gtk_menu_popup (GTK_MENU (popup), NULL, NULL, NULL, NULL, - button, event_time); + g_return_if_fail (event != NULL); + +#if GTK_CHECK_VERSION (3, 22, 0) + gtk_menu_popup_at_pointer (GTK_MENU (thumbview->priv->menu), + (const GdkEvent*) event); +#else + gtk_menu_popup (GTK_MENU (thumbview->priv->menu), + NULL, NULL, NULL, NULL, + event->button, event->time); +#endif } -- cgit v1.2.1