[Xfce4-commits] [apps/xfce4-notifyd] 01/01: Fix deprecation methods usage for GTK <= 3.20 (Bug #13943)

noreply at xfce.org noreply at xfce.org
Sun Oct 22 01:21:26 CEST 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 apps/xfce4-notifyd.

commit 8e968ea745098eb3188eafbefb6c27d0b7880525
Author: Viktor Odintsev <ninetls at xfce.org>
Date:   Sat Oct 21 08:39:19 2017 +0000

    Fix deprecation methods usage for GTK <= 3.20 (Bug #13943)
---
 panel-plugin/notification-plugin.c | 5 +++++
 xfce4-notifyd/xfce-notify-daemon.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/notification-plugin.c b/panel-plugin/notification-plugin.c
index 4d6412f..bb7b9ba 100644
--- a/panel-plugin/notification-plugin.c
+++ b/panel-plugin/notification-plugin.c
@@ -81,6 +81,7 @@ void
 notification_plugin_popup_menu (NotificationPlugin *notification_plugin)
 {
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (notification_plugin->button), TRUE);
+#if GTK_CHECK_VERSION (3, 22, 0)
   gtk_menu_popup_at_widget (GTK_MENU (notification_plugin->menu),
                             notification_plugin->button,
                             xfce_panel_plugin_get_orientation (notification_plugin->plugin) == GTK_ORIENTATION_VERTICAL
@@ -88,6 +89,10 @@ notification_plugin_popup_menu (NotificationPlugin *notification_plugin)
                             xfce_panel_plugin_get_orientation (notification_plugin->plugin) == GTK_ORIENTATION_VERTICAL
                             ? GDK_GRAVITY_EAST : GDK_GRAVITY_SOUTH,
                             NULL);
+#else
+  gtk_menu_popup (GTK_MENU (notification_plugin->menu), NULL, NULL,
+                  xfce_panel_plugin_position_menu, notification_plugin, 0, 0);
+#endif
   xfce_panel_plugin_register_menu (notification_plugin->plugin,
                                    GTK_MENU (notification_plugin->menu));
 }
diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c
index e5ff963..0d547d0 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -216,7 +216,7 @@ xfce_notify_daemon_get_primary_monitor (GdkScreen *screen)
 
     return xfce_notify_daemon_get_monitor_index (display, monitor);
 #else
-    return gdk_screen_get_primary_monitor(widget_screen);
+    return gdk_screen_get_primary_monitor (screen);
 #endif
 }
 
@@ -231,7 +231,7 @@ xfce_notify_daemon_get_monitor_at_point (GdkScreen *screen,
 
     return xfce_notify_daemon_get_monitor_index (display, monitor);
 #else
-    return gdk_screen_get_monitor_at_point(widget_screen);
+    return gdk_screen_get_monitor_at_point (screen, x, y);
 #endif
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list