playback/player: gtk_menu_popup() is deprecated

gtk_menu_popup() is deprecated in GTK+ 3.22. This patch adds a
compiler guard to use gtk_menu_popup at pointer() if GTK+ is 3.22
or bigger.

https://bugzilla.gnome.org/show_bug.cgi?id=781904
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-04-28 17:20:07 +02:00 committed by Sebastian Dröge
parent dbb0375bfe
commit d909deaaf4

View file

@ -1263,9 +1263,13 @@ gtk_player_popup_menu_create (GtkPlay * play, GdkEventButton * event)
gtk_menu_shell_append (GTK_MENU_SHELL (menu), quit);
gtk_widget_show_all (menu);
#if GTK_CHECK_VERSION(3,22,00)
gtk_menu_popup_at_pointer (GTK_MENU (menu), (GdkEvent *) event);
#else
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
(event != NULL) ? event->button : 0,
gdk_event_get_time ((GdkEvent *) event));
#endif
if (media_info)
g_object_unref (media_info);