[Xfce4-commits] <xfce4-appfinder:master> Don't ignore arguments of the desktop file command.

Nick Schermer noreply at xfce.org
Thu Sep 29 22:40:01 CEST 2011


Updating branch refs/heads/master
         to e40873a419dd82c94ad3c2bf28ef3ac0f17cf8ae (commit)
       from f480539bf18130d52639603e0b1ba8f126ed6745 (commit)

commit e40873a419dd82c94ad3c2bf28ef3ac0f17cf8ae
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Sep 29 22:16:18 2011 +0200

    Don't ignore arguments of the desktop file command.
    
    This makes a number of desktop files easier to
    understand, for example 'libreoffice --writer'.

 src/appfinder-model.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/appfinder-model.c b/src/appfinder-model.c
index 1edc597..f4e6400 100644
--- a/src/appfinder-model.c
+++ b/src/appfinder-model.c
@@ -661,8 +661,8 @@ xfce_appfinder_model_item_key (GarconMenuItem *item)
   value = garcon_menu_item_get_command (item);
   if (value != NULL)
     {
-      /* only add first part of the command */
-      p = strchr (value, ' ');
+      /* only the non-expanding command items */
+      p = strchr (value, '%');
       g_string_append_len (str, value, p != NULL ? p - value : -1);
     }
   g_string_append_c (str, '\n');
@@ -696,7 +696,7 @@ xfce_appfinder_model_item_new (GarconMenuItem *menu_item)
   command = garcon_menu_item_get_command (menu_item);
   if (G_LIKELY (command != NULL))
     {
-      p = strchr (command, ' ');
+      p = strstr (command, " %");
       if (p != NULL)
         item->command = g_strndup (command, p - command);
       else


More information about the Xfce4-commits mailing list