1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

added || pipe menu for non-cached generated menus

This commit is contained in:
kojima
2001-12-04 12:05:45 +00:00
parent 363290d919
commit 739fd1a567

View File

@@ -128,6 +128,7 @@ static Shortcut *shortcutList = NULL;
* the resulting menu in current position. The output of * the resulting menu in current position. The output of
* command must be a valid menu description. * command must be a valid menu description.
* The space between '|' and command is optional. * The space between '|' and command is optional.
* || will do the same, but will not cache the contents.
* SAVE_SESSION - saves the current state of the desktop, which include * SAVE_SESSION - saves the current state of the desktop, which include
* all running applications, all their hints (geometry, * all running applications, all their hints (geometry,
* position on screen, workspace they live on, the dock * position on screen, workspace they live on, the dock
@@ -679,19 +680,22 @@ constructMenu(WMenu *menu, WMenuEntry *entry)
(char*)entry->clientdata); (char*)entry->clientdata);
return; return;
} }
if (path[0][0]=='|') { if (path[0][0]=='|') {
/* pipe menu */ /* pipe menu */
if (!menu->cascades[entry->cascade] || if (!menu->cascades[entry->cascade] ||
menu->cascades[entry->cascade]->timestamp == 0) { menu->cascades[entry->cascade]->timestamp == 0) {
/* parse pipe */ /* parse pipe */
submenu = readMenuPipe(menu->frame->screen_ptr, path); submenu = readMenuPipe(menu->frame->screen_ptr, path);
/* there's no automatic reloading */ if(submenu != NULL) {
if(submenu != NULL) if (path[0][1] == '|')
submenu->timestamp = 1; submenu->timestamp = 0;
else
submenu->timestamp = 1; /* there's no automatic reloading */
}
} else { } else {
submenu = NULL; submenu = NULL;
} }