Re: FVWM: howto conditionally add menu entries?

hw <[email protected]>
Newsgroups gmane.comp.window-managers.fvwm
Organization my virtual residence
Message-ID <[email protected]>
Thomas Adam <[email protected]> writes:

> On Fri, 2 Aug 2019 at 20:34, hw <[email protected]> wrote:
>> DestroyMenu Main
>> AddToMenu Main
>> + Test (f fvwm-functions-starters-games.fvwm) AddToMenu Main "Games" PopUp Games
>
> That's not going to work, because when the '+' command is run for a
> menu-context, the menu code doesn't understand/execute things like the
> 'Test' command.
>
> In your case, you need to wrap the menu definitions in a function:
>
> DestroyFunc foo
> AddToFunc.  foo
> + Test (....) AddToMenu .....


AddToFunc StartFunction
+ Test (F fvwm-functions-starters-games.fvwm) AddToMenu Main "Games" PopUp Games


... doesn't work

However, I can't tell if the test is successful or not.  Yet


AddToFunc StartFunction
+ AddToMenu Main "Games" PopUp Games


... doesn't work, either.  Otherwise, how would I make sure that the
function that adds the menu entry is being exectued only once, and at
the right time?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.