Re: (Was: FVWM: Fvwm 2 next release)

From: Brandon M. Browning <brandon_at_powertie.org>
Date: Fri, 12 Apr 1996 10:21:07 -0700 (PDT)

On Fri, 12 Apr 1996 chuck_hines_at_VNET.IBM.COM wrote:

> >>>>> "Michael" == Michael J Carter <mcarter_at_lanl.gov> writes:
>
> Michael> "He" says that tvtwm does a fstat() on a 'menu file', and if
> Michael> it has changed, the new version is read without the need to
> Michael> push a button. I must admit it is more elegant....
>
> How about this:
>
<snip of dynamic menu code>
>
> It reads the file every time, regardless of whether it changed or not,
> but it accomplishes basically the same thing.

Yes, I've tried that and found that I really didn't like it. Why? It's
too bloody slow (at least on my system). Instead of popping the menu
instantaneously, it'd take a second or two. Not my idea of fun,
especially when I'm working. Oh, but I have another solution. This one
isn't as elegant (or maybe it is), but I've run across something that
might be a potential bug.

I wanted "dynamic" menus as well because I tend to stay logged into X a
lot. When I want to add a new entry (usually an application), I had to
restart when all I really wanted to do is reread the menu. Rereading the
menus every time like Chuck's example defeats the purpose for me because I
don't make that many changes to my menu.

Well, by using DestroyMenu and Read, I'm able to reread all the menus when
I want to. Yes, one has to destroy them all to reread them. And herein
lies the problem. Here's my function:

  AddToFunc ReadMenus "I" DestroyMenu Applications
  + "I" DestroyMenu Commands
  + "I" DestroyMenu Games
  + "I" DestroyMenu Modules
  + "I" DestroyMenu Remote-Logins
  + "I" DestroyMenu Shells
  + "I" DestroyMenu Utilities
  + "I" Read .menu-applications
  + "I" Read .menu-commands
  + "I" Read .menu-games
  + "I" Read .menu-modules
  + "I" Read .menu-remotelogins
  + "I" Read .menu-shells
  + "I" Read .menu-utilities

(each .menu-* is a AddToMenu); and I've added:

  + "Reread Menus" ReadMenus

in menu binding. Then, when I've made a change, I can just select "Reread
Menus" and FVWM dutifully rereads the menu set. This isn't the problem
(it works wonderfully & quick, too). The problem is that if I try to
reread the menus and I've changed *nothing* in them, FVWM takes down the
entire X session. So ... if anything has been changed in any of those
menu files, I'm okay. If I accidently reread and nothing has been
changed.... well, i'm outta luck.

Is this supposed to happen, or did I just find an elusive bug? FWIW, I'm
running Linux 1.2.13 & the latest beta of FVWM...


-- Brandon Browning )
   Powertie Software (
   http://www.powertie.org/ c[]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Reality is frequently inaccurate.

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri Apr 12 1996 - 12:13:12 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:58 BST