27 lines
1.6 KiB
Diff
27 lines
1.6 KiB
Diff
Index: gio/gdesktopappinfo.c
|
|
===================================================================
|
|
--- gio/gdesktopappinfo.c (révision 6873)
|
|
+++ gio/gdesktopappinfo.c (copie de travail)
|
|
@@ -259,7 +259,20 @@ g_desktop_app_info_new_from_filename (co
|
|
info->only_show_in = g_key_file_get_string_list (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN, NULL, NULL);
|
|
info->not_show_in = g_key_file_get_string_list (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN, NULL, NULL);
|
|
info->try_exec = try_exec;
|
|
- info->exec = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_EXEC, NULL);
|
|
+ if (g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP,
|
|
+ "X-KDE-SubstituteUID", NULL) &&
|
|
+ g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP,
|
|
+ "X-KDE-RootOnly", NULL))
|
|
+ {
|
|
+ char *real_exec;
|
|
+ real_exec = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_EXEC, NULL);
|
|
+ info->exec = g_strdup_printf ("gnomesu -- %s", real_exec);
|
|
+ g_free (real_exec);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ info->exec = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_EXEC, NULL);
|
|
+ }
|
|
info->path = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_PATH, NULL);
|
|
info->terminal = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TERMINAL, NULL) != FALSE;
|
|
info->startup_notify = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY, NULL) != FALSE;
|