[Xfce4-commits] <xfce4-panel:nick/gtk3> Directory menu: ported to Gtk3

Andrzej noreply at xfce.org
Thu Apr 11 02:34:01 CEST 2013


Updating branch refs/heads/nick/gtk3
         to 6cd290c075e56b06ce11abff3417e73ad92cdb84 (commit)
       from 8427a172866d2b6aeb8ab7e1c5d8fbd2c2092068 (commit)

commit 6cd290c075e56b06ce11abff3417e73ad92cdb84
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Thu Apr 11 01:32:25 2013 +0100

    Directory menu: ported to Gtk3

 plugins/directorymenu/directorymenu.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/plugins/directorymenu/directorymenu.c b/plugins/directorymenu/directorymenu.c
index a8f5483..edd72e3 100644
--- a/plugins/directorymenu/directorymenu.c
+++ b/plugins/directorymenu/directorymenu.c
@@ -476,7 +476,7 @@ directory_menu_plugin_remote_event (XfcePanelPlugin *panel_plugin,
   panel_return_val_if_fail (value == NULL || G_IS_VALUE (value), FALSE);
 
   if (strcmp (name, "popup") == 0
-      && GTK_WIDGET_VISIBLE (panel_plugin)
+      && gtk_widget_get_visible (GTK_WIDGET (panel_plugin))
       && !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (plugin->button))
       && panel_utils_grab_available ())
     {
@@ -556,11 +556,13 @@ directory_menu_plugin_menu_launch_desktop_file (GtkWidget *mi,
   GdkAppLaunchContext *context;
   GIcon               *icon;
   GError              *error = NULL;
+  GdkDisplay          *display;
 
   panel_return_if_fail (G_IS_APP_INFO (info));
   panel_return_if_fail (GTK_IS_WIDGET (mi));
 
-  context = gdk_app_launch_context_new ();
+  display = gtk_widget_get_display (mi);
+  context = gdk_display_get_app_launch_context (display);
   gdk_app_launch_context_set_screen (context, gtk_widget_get_screen (mi));
   gdk_app_launch_context_set_timestamp (context, gtk_get_current_event_time ());
   icon = g_app_info_get_icon (info);
@@ -592,6 +594,7 @@ directory_menu_plugin_menu_launch (GtkWidget *mi,
   GFileInfo           *info;
   const gchar         *message;
   gboolean             result;
+  GdkDisplay          *display;
 
   panel_return_if_fail (G_IS_FILE (file));
   panel_return_if_fail (GTK_IS_WIDGET (mi));
@@ -615,7 +618,8 @@ directory_menu_plugin_menu_launch (GtkWidget *mi,
 
   fake_list.data = file;
 
-  context = gdk_app_launch_context_new ();
+  display = gtk_widget_get_display (mi);
+  context = gdk_display_get_app_launch_context (display);
   gdk_app_launch_context_set_screen (context, gtk_widget_get_screen (mi));
   gdk_app_launch_context_set_timestamp (context, gtk_get_current_event_time ());
 


More information about the Xfce4-commits mailing list