Subject: Re: FVWM: Re: DynamicPopupAction

From: Jason Kibblewhite <[email-masked]>
Date: Sun, 24 Oct 1999 04:14:50 -0600

>> Well as soon as I saw the recreate I said to myself doh.  Seems to
make
>> sense, but sounds kinda kludgy to me so I'll go with my original idea
to
>> read them all if you popup the Headlines menu maybe via a function.

>         Well, I haven't looked at the code, so I can't comment on how
kludgy it
> may be, but I don't see what the problem is with having an option on
the
> DestroyMenu command that effectively says "destroy only the menu
items,
> but retain the menu attributes". And (assuming that it works properly)
I
> can't see anything much easier than changing the script that creates
the
> freshmeatmenu, etc., files to insert the line "DestroyMenu Recreate
> Freshmeat" instead of simply "DestroyMenu Freshmeat".

Well the problem seems to be that a recreate doesn't do the add the
DynamicPopupAction back into the menu, I've also not looked at the code
but what I think that the recreate option does is saves you from having
to use an addtomenu to make it again, but I could be wrong.  So as a
result we're back to the same thing again.  I suppose kludgy might be
the wrong word to use, how about cluttered?  So if recreate doesn't
recreate the menu with it's previous options such as DynamicPopupAction
as "I" think your saying it does or think is does, then our solutions
are as you said to have the perl script toss that in it, or use some
other way like a function for each one as the man page examples have for
the jpgmenu.  Neither are something IMHO are the best solution so I just
did this:

DestroyMenu Headlines
AddToMenu Headlines Headlines Title
+ DynamicPopupAction Headlines
+ "Freshmeat"       Popup Freshmeat
+ "Slashdot"        Popup Slashdot
+ "Linux Today"     Popup LinuxToday

DestroyFunc Headlines
AddToFunc Headlines
+           "I" Read .freshmeatmenu quiet
+           "I" Read .slashdotmenu  quiet
+           "I" Read .linuxtodaymenu quiet

Which works just dandy I must say and it's cleaner then some of the
other solutions.

BTW if anyone else wants them it's not hard to modify even for someone
like me that knows less then 0% about perl.  Or I can give you mine...

--
This is my .sig, pretty dull eh

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Bob Woodside <[email-masked]>
Date: Sun, 24 Oct 1999 21:35:08 -0400

Jason Kibblewhite wrote:
> DynamicPopupAction back into the menu....

	What's strange is that it works just fine for me. All I did was change
the first line of .freshmeatmenu to "DestroyMenu Recreate Freshmeat".
What version of FVWM are you running? - mine was freshly updated from
CVS a couple of days ago. Maybe there was a problem that's since been
fixed, I don't know.

	In any case, if you have another approach that you like better, by all
means go for it!

	[  think  think  think  hmmm...  whirrr...  ]

	One last thought...did you do a Restart after changing your script to
use the Recreate option? Once the menu's been destroyed and rebuilt
without the DynamicPopup action, it's a static menu. It will never again
cause the file to be re-read unless you Restart - or manually redefine
the menu by entering commands through FvwmConsole or something like
that.

Cheers,
Bob