43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
|
diff --git a/src/wmprog.cc b/src/wmprog.cc
|
||
|
index 608608f..1d129a3 100644
|
||
|
--- a/src/wmprog.cc
|
||
|
+++ b/src/wmprog.cc
|
||
|
@@ -249,6 +249,14 @@ char *parseIncludeStatement(IApp *app, YSMListener *smActionListener, YActionLis
|
||
|
return p;
|
||
|
}
|
||
|
|
||
|
+void loadMenusProg(
|
||
|
+ IApp *app,
|
||
|
+ YSMListener *smActionListener,
|
||
|
+ YActionListener *wmActionListener,
|
||
|
+ const char *command,
|
||
|
+ char *const argv[],
|
||
|
+ ObjectContainer *container);
|
||
|
+
|
||
|
char *parseMenus(IApp *app, YSMListener *smActionListener, YActionListener *wmActionListener, char *data, ObjectContainer *container) {
|
||
|
char *p = data;
|
||
|
char word[32];
|
||
|
@@ -415,6 +423,22 @@ char *parseMenus(IApp *app, YSMListener *smActionListener, YActionListener *wmAc
|
||
|
delete[] name;
|
||
|
delete[] icons;
|
||
|
delete[] command;
|
||
|
+ } else if (!strcmp(word, "suseprog")) {
|
||
|
+ char *command;
|
||
|
+ YStringArray args;
|
||
|
+
|
||
|
+ p = getCommandArgs(p, &command, args);
|
||
|
+ if (p == 0) {
|
||
|
+ msg(_("Error at prog %s"), "susemenu"); return p;
|
||
|
+ }
|
||
|
+
|
||
|
+ MSG(("suseprog %s", command));
|
||
|
+
|
||
|
+ upath fullPath = findPath(getenv("PATH"), X_OK, command);
|
||
|
+ if (fullPath != null) {
|
||
|
+ loadMenusProg(app,smActionListener,wmActionListener,command,args.getCArray(),container);
|
||
|
+ }
|
||
|
+ delete[] command;
|
||
|
} else if (!strcmp(word, "menuprogreload")) {
|
||
|
char *name;
|
||
|
|