[gupnp-tools] av-cp: Remove deprecation warning on GTK 3.22



commit f1cc7c3b25202836f05343cec388331285de86dc
Author: Jens Georg <mail jensge org>
Date:   Sat Jul 1 12:52:15 2017 +0200

    av-cp: Remove deprecation warning on GTK 3.22

 src/av-cp/search-dialog.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/av-cp/search-dialog.c b/src/av-cp/search-dialog.c
index 47ca78a..31f9287 100644
--- a/src/av-cp/search-dialog.c
+++ b/src/av-cp/search-dialog.c
@@ -600,6 +600,11 @@ search_dialog_on_search_activate (SearchDialog *self, GtkEntry *entry)
 static void
 do_popup_menu (GtkMenu *menu, GtkWidget *widget, GdkEventButton *event)
 {
+#if GTK_CHECK_VERSION(3,22,0)
+    gtk_menu_popup_at_pointer (menu,
+                               event != NULL ? (GdkEvent *) event
+                                             : gtk_get_current_event ());
+#else
         int button = 0;
         int event_time;
         if (event) {
@@ -610,6 +615,7 @@ do_popup_menu (GtkMenu *menu, GtkWidget *widget, GdkEventButton *event)
         }
 
         gtk_menu_popup (menu, NULL, NULL, NULL, NULL, button, event_time);
+#endif
 }
 
 G_MODULE_EXPORT


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]