[gnome-shell] [ShellAppSystem] Don't use g_desktop_app_info_new



commit bd250e188b345cd4f4c6a90602b1dfed250bcff2
Author: Maxim Ermilov <zaspire rambler ru>
Date:   Mon Oct 11 18:37:21 2010 +0400

    [ShellAppSystem] Don't use g_desktop_app_info_new
    
    It doesn't fully support convert id to path. For example: multiply
    subdirs, "LegacyDir prefix" in .menu files...
    https://bugzilla.gnome.org/show_bug.cgi?id=614879

 src/shell-app-system.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index 3fce132..3bfca45 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -1311,7 +1311,6 @@ shell_app_info_launch_full (ShellAppInfo *info,
                             GError      **error)
 {
   GDesktopAppInfo *gapp;
-  char *filename;
   GdkAppLaunchContext *context;
   gboolean ret;
   ShellGlobal *global;
@@ -1333,11 +1332,13 @@ shell_app_info_launch_full (ShellAppInfo *info,
     }
   else if (info->type == SHELL_APP_INFO_TYPE_ENTRY)
     {
-      gapp = g_desktop_app_info_new (shell_app_info_get_id (info));
+      /* Can't use g_desktop_app_info_new, see bug 614879 */
+      const char *filename = gmenu_tree_entry_get_desktop_file_path ((GMenuTreeEntry *)info->entry);
+      gapp = g_desktop_app_info_new_from_filename (filename);
     }
   else
     {
-      filename = shell_app_info_get_desktop_file_path (info);
+      char *filename = shell_app_info_get_desktop_file_path (info);
       gapp = g_desktop_app_info_new_from_filename (filename);
       g_free (filename);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]