[Xfce4-commits] [apps/xfce4-terminal] 01/01: Resolve gdk_menu_popup deprecation warnings
noreply at xfce.org
noreply at xfce.org
Sun Oct 23 19:20:12 CEST 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit 09839017c428a1f608667f0a36621270cbb88d67
Author: Igor <f2404 at yandex.ru>
Date: Sun Oct 23 20:20:07 2016 +0300
Resolve gdk_menu_popup deprecation warnings
---
terminal/terminal-widget.c | 4 ++++
terminal/terminal-window-dropdown.c | 4 ++++
terminal/terminal-window.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/terminal/terminal-widget.c b/terminal/terminal-widget.c
index e5ff96b..8d2da66 100644
--- a/terminal/terminal-widget.c
+++ b/terminal/terminal-widget.c
@@ -346,7 +346,11 @@ terminal_widget_context_menu (TerminalWidget *widget,
/* run our custom main loop */
gtk_grab_add (menu);
+#if GTK_CHECK_VERSION (3, 22, 0)
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
+#else
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
+#endif
g_main_loop_run (loop);
g_main_loop_unref (loop);
gtk_grab_remove (menu);
diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index 7af50a7..3f68910 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -547,10 +547,14 @@ terminal_window_dropdown_status_icon_popup_menu (GtkStatusIcon *status_
gtk_action_create_menu_item (action));
gtk_widget_show_all (menu);
+#if GTK_CHECK_VERSION (3, 22, 0)
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
+#else
gtk_menu_popup (GTK_MENU (menu),
NULL, NULL,
NULL, NULL,
button, timestamp);
+#endif
}
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 8ebe241..c468af8 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1115,7 +1115,11 @@ terminal_window_notebook_button_press_event (GtkNotebook *notebook,
/* show the tab menu */
menu = gtk_ui_manager_get_widget (window->ui_manager, "/tab-menu");
+#if GTK_CHECK_VERSION (3, 22, 0)
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
+#else
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time);
+#endif
}
return TRUE;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list