[Xfce4-commits] <xfce4-panel:master> Directorymenu: Fix prefered app not working without snotify (bug #8298).

Nick Schermer noreply at xfce.org
Thu Jan 19 18:18:01 CET 2012


Updating branch refs/heads/master
         to c189a35a779c54e3b21693231f4b9dbecc69947b (commit)
       from c18d08fb1e5f67441e4d35cb5d68fb8c9e98ed0d (commit)

commit c189a35a779c54e3b21693231f4b9dbecc69947b
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Jan 19 18:16:24 2012 +0100

    Directorymenu: Fix prefered app not working without snotify (bug #8298).

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

diff --git a/plugins/directorymenu/directorymenu.c b/plugins/directorymenu/directorymenu.c
index 48a956e..d2e20a6 100644
--- a/plugins/directorymenu/directorymenu.c
+++ b/plugins/directorymenu/directorymenu.c
@@ -651,6 +651,7 @@ directory_menu_plugin_menu_open (GtkWidget   *mi,
   guint         i;
   gboolean      result = FALSE;
   gchar        *argv[3];
+  gboolean      startup_notify = FALSE;
 
   /* try to work around the exo code and get the direct command */
   rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, "xfce4/helpers.rc", TRUE);
@@ -665,13 +666,10 @@ directory_menu_plugin_menu_open (GtkWidget   *mi,
 
           if (G_LIKELY (helperrc != NULL))
             {
-              /* only try our custom stuff if startup notify is supported */
-              if (xfce_rc_read_bool_entry (helperrc, "StartupNotify", FALSE))
-                {
-                  value = xfce_rc_read_entry_untranslated (helperrc, "X-XFCE-Binaries", NULL);
-                  if (value != NULL)
-                    binaries = g_strsplit (value, ";", -1);
-                }
+              startup_notify = xfce_rc_read_bool_entry (helperrc, "StartupNotify", FALSE);
+              value = xfce_rc_read_entry_untranslated (helperrc, "X-XFCE-Binaries", NULL);
+              if (value != NULL)
+                binaries = g_strsplit (value, ";", -1);
 
               xfce_rc_close (helperrc);
             }
@@ -699,7 +697,8 @@ directory_menu_plugin_menu_open (GtkWidget   *mi,
           /* try to spawn the program, if this fails we try exo for
            * a decent error message */
           result = xfce_spawn_on_screen (gtk_widget_get_screen (mi),
-                                         working_dir, argv, NULL, 0, TRUE,
+                                         working_dir, argv, NULL, 0,
+                                         startup_notify,
                                          gtk_get_current_event_time (),
                                          NULL, NULL);
           g_free (filename);


More information about the Xfce4-commits mailing list