[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Fix compilation warning about gtk_menu_popup
noreply at xfce.org
noreply at xfce.org
Thu Nov 9 23:57:48 CET 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-power-manager.
commit 48715c7fadbd47df6859b2db04d482dcef3d3464
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Nov 9 23:57:33 2017 +0100
Fix compilation warning about gtk_menu_popup
---
panel-plugins/power-manager-plugin/power-manager-button.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/panel-plugins/power-manager-plugin/power-manager-button.c b/panel-plugins/power-manager-plugin/power-manager-button.c
index c9294ed..9518dc1 100644
--- a/panel-plugins/power-manager-plugin/power-manager-button.c
+++ b/panel-plugins/power-manager-plugin/power-manager-button.c
@@ -1676,6 +1676,20 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_menu_shell_append (GTK_MENU_SHELL(menu), mi);
g_signal_connect (G_OBJECT(mi), "activate", G_CALLBACK(xfpm_preferences), NULL);
+#if GTK_CHECK_VERSION (3, 22, 0)
+ gtk_menu_popup_at_widget (GTK_MENU (menu),
+ GTK_WIDGET (button),
+#ifdef XFCE_PLUGIN
+ xfce_panel_plugin_get_orientation (button->priv->plugin) == GTK_ORIENTATION_VERTICAL
+ ? GDK_GRAVITY_WEST : GDK_GRAVITY_NORTH,
+ xfce_panel_plugin_get_orientation (button->priv->plugin) == GTK_ORIENTATION_VERTICAL
+ ? GDK_GRAVITY_EAST : GDK_GRAVITY_SOUTH,
+#else
+ GDK_GRAVITY_NORTH,
+ GDK_GRAVITY_SOUTH,
+#endif
+ NULL);
+#else
gtk_menu_popup (GTK_MENU (menu),
NULL,
NULL,
@@ -1691,4 +1705,5 @@ G_GNUC_END_IGNORE_DEPRECATIONS
#endif
0,
gtk_get_current_event_time ());
+#endif
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list