Subject: Re: dynamism in FvwmButtons

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 25 Aug 2002 14:10:04 +0000

On 03 Jun 2002 18:43:55 +0200, Dominik Vogt wrote:
> 
> On Wed, May 29, 2002 at 09:22:16PM +0000, Mikhael Goikhman wrote:
> > On 29 May 2002 20:59:58 +0000, Mikhael Goikhman wrote:
> > > 
> > >   SendToModule FvwmButtons ChangeButton <button-id> Title/Icon <value>
> > > 
> > > <button-id> may be as it is now, number starting from 0 or "+x+y".
> > > I will also add a syntax similar to "2/3" meaning the button number 3
> > > in the container number 2. Should the syntax start counting from 0 or 1?
> > 
> > One addition. Id will be optionally specified in any button, i.e.:
> > 
> >   *FvwmButtons: (Id current_time, Title 14:00)
> > 
> >   SendToModule FvwmButtons ChangeButton current_time Title 14:01
> 
> I wonder if there is a better method than the "SendToModule" stuff
> with a different syntax for all modules.  It shouldn't be too
> difficult to ose the usual "*<ModuleName>: ..." syntax, e.g.
> 
>   *FvwmButtons: (<button id>, Icon foo.xpm, Title "bar")

I tried to examine this approach, but this does not seem to work well.
The idea could be this. If a new button definition has the existing id,
instead of creating a new button the existing one is modified. Ideally, it
should be irrelevant whether the modification line is issued before
FvwmButtons is started or after, but this seems difficult to implement.
The following:

  *FvwmButtons: (Id dyna-button1, Icon icon.xpm, Padding 2 2)
  ...
  # either statically or dynamically:
  *FvwmButtons: (Id dyna-button1, Text text, Icon)

should be equivalent to:

  *FvwmButtons: (Id dyna-button1, Text text, Padding 2 2)

It involves the geometry changes with minimal redraws...
This would be nice to have, but I am not sure how many people need this.

Another problem with this approach other than difficulty to implement is
that if the change is done often, for example, every minute, we end up
with thousands of module config lines to be stored and processed on a new
module startup.

So for now, there is a clear division between the static configuration
using *FvwmButtons: lines and dynamical changes using SendToModule actions.

I will commit the initial step soon.

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