gnome-desktop/X-KDE-SubstituteUID.dif

36 lines
1.4 KiB
Plaintext

Index: libgnome-desktop/gnome-desktop-item.c
================================================================================
--- libgnome-desktop/gnome-desktop-item.c
+++ libgnome-desktop/gnome-desktop-item.c
@@ -2085,8 +2085,16 @@
/* make a new copy and get rid of spaces */
- the_exec = g_alloca (strlen (exec) + 1);
- strcpy (the_exec, exec);
+
+ if (gnome_desktop_item_get_boolean (item, GNOME_DESKTOP_ITEM_SUBSTITUTEUID) ||
+ gnome_desktop_item_get_boolean (item, GNOME_DESKTOP_ITEM_ROOT_ONLY)) {
+ the_exec = g_alloca (strlen (exec) + sizeof ("gnomesu -- "));
+ strcpy (the_exec, "gnomesu -- ");
+ strcat (the_exec, exec);
+ } else {
+ the_exec = g_alloca (strlen (exec) + 1);
+ strcpy (the_exec, exec);
+ }
if ( ! strip_the_amp (the_exec)) {
g_set_error (error,
--- libgnome-desktop/libgnome/gnome-desktop-item.h
+++ libgnome-desktop/libgnome/gnome-desktop-item.h
@@ -96,7 +96,8 @@
#define GNOME_DESKTOP_ITEM_SORT_ORDER "SortOrder" /* strings */
#define GNOME_DESKTOP_ITEM_URL "URL" /* string */
#define GNOME_DESKTOP_ITEM_DOC_PATH "X-GNOME-DocPath" /* string */
-
+#define GNOME_DESKTOP_ITEM_SUBSTITUTEUID "X-KDE-SubstituteUID" /*boolean*/
+#define GNOME_DESKTOP_ITEM_ROOT_ONLY "X-KDE-RootOnly" /*boolean*/
/* The vfolder proposal */
#define GNOME_DESKTOP_ITEM_CATEGORIES "Categories" /* string */
#define GNOME_DESKTOP_ITEM_ONLY_SHOW_IN "OnlyShowIn" /* string */