From 739fd1a567d11a6a29f314abc461bd2a071a9c37 Mon Sep 17 00:00:00 2001 From: kojima Date: Tue, 4 Dec 2001 12:05:45 +0000 Subject: [PATCH] added || pipe menu for non-cached generated menus --- src/rootmenu.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/rootmenu.c b/src/rootmenu.c index c7b3f84e..f1a47895 100644 --- a/src/rootmenu.c +++ b/src/rootmenu.c @@ -128,6 +128,7 @@ static Shortcut *shortcutList = NULL; * the resulting menu in current position. The output of * command must be a valid menu description. * 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 * all running applications, all their hints (geometry, * position on screen, workspace they live on, the dock @@ -679,19 +680,22 @@ constructMenu(WMenu *menu, WMenuEntry *entry) (char*)entry->clientdata); return; } - + if (path[0][0]=='|') { /* pipe menu */ - + if (!menu->cascades[entry->cascade] || menu->cascades[entry->cascade]->timestamp == 0) { /* parse pipe */ submenu = readMenuPipe(menu->frame->screen_ptr, path); - /* there's no automatic reloading */ - if(submenu != NULL) - submenu->timestamp = 1; + if(submenu != NULL) { + if (path[0][1] == '|') + submenu->timestamp = 0; + else + submenu->timestamp = 1; /* there's no automatic reloading */ + } } else { submenu = NULL; }