summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-04-27 10:04:54 +0200
committerraveit65 <[email protected]>2017-04-27 10:04:54 +0200
commitc1e7916d178c8d7bb80c71d9e3ffb4aad5d1ef1c (patch)
tree3821a886ccc4acadcd298224b295f6140caf467f
parenta7c17de7eae77d82da0ac36cc49635dc51cb258b (diff)
downloadeom-c1e7916d178c8d7bb80c71d9e3ffb4aad5d1ef1c.tar.bz2
eom-c1e7916d178c8d7bb80c71d9e3ffb4aad5d1ef1c.tar.xz
EomThumbView: Replace deprecated gtk_menu_popup function
-rw-r--r--src/eom-thumb-view.c25
1 files changed, 10 insertions, 15 deletions
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
}