diff --git a/WindowMaker/menu.in b/WindowMaker/menu.in index 429f8bec..f8a209c8 100644 --- a/WindowMaker/menu.in +++ b/WindowMaker/menu.in @@ -74,6 +74,11 @@ * -noext strip whatever is after the last dot in the * file name * + * // Use #usergnusteppath# as a placeholder for the path to the user + * // GNUstep directory. Window Maker will replace this with the value + * // of GNUSTEP_USER_ROOT, if this environment variable is set, or + * // "~/GNUstep" otherwise + * * is the program to execute. * * ** Options for command line in EXEC: diff --git a/src/rootmenu.c b/src/rootmenu.c index 77b05a2a..fc8774e0 100644 --- a/src/rootmenu.c +++ b/src/rootmenu.c @@ -673,6 +673,11 @@ static void constructMenu(WMenu * menu, WMenuEntry * entry) } tmp = wexpandpath(path[i]); + + if (strstr(tmp, "#usergnusteppath#") == tmp) + tmp = wstrconcat(wusergnusteppath(), + tmp + 17); + wfree(path[i]); lpath = getLocalizedMenuFile(tmp); if (lpath) {