Re: FVWM: FvwmButtons: shade and wait for application to be launched

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Tue, 2 Jul 2002 09:48:41 +0000

On 02 Jul 2002 01:27:40 +0200, Dominik Vogt wrote:
>
> Wait a moment. It *is* possible to change the icon while waiting
> for the application already, at least in the latest development
> code. We recently hacked something into FvwmButtons that allows
> to change the text and icons in a running FvwmButtons. It's a bit
> difficult to configure, but it works well. So, you can bind a
> function to the button that changes the icon, waits for the app
> and restores the old icon:
>
> *FvwmButtons: (Icon foo.xpm, Action Function start_foo_func)
>
> AddToFunc start_foo_func
> + I SendToModule FvwmButtons Icon <button-spec> foobar.xpm
> + I Exec exec foo
> + I Wait foo
> + I SendToModule FvwmButtons Icon <button-spec> foo.xpm
>
> <button-spec> describes which button is changed. It can either be
> a column/row pair ("+1+3"). Or a button number (only buttons with
> icons count, top left button is #0).

The "SendToModule FvwmButtons" syntax above will be changed (enhanced).
I didn't suggest this solution, because it is not generic.

This code does not do what PressedOffset is expected to, it changes an
icon of _one_ specific button _after_ it was activated (i.e. mouse button
released). PressedOffset works when the mouse button is _pressed_ and
until it is released or a window appears (if hangon used). PressedOffset
works when normally Frame is changed from "raised" to "sunken" and also
without a frame (Frame is 0). This functionality is absent and can't be
currently simulated.

Also, if you have 10 buttons that start applications, you should draw
additional 10 icons (not everyone is an artist) and add a lot of code.
Instead of just adding one line: *FvwmButtons: PressedOffset 2 -3".

Another improvement may be to add PressedIcon option (this icon would be
used instead of Icon when a button is pressed). But for users without
additional icons or for users with Frame 0, PressedOffset should be enough.

Regards,
Mikhael.
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Jul 02 2002 - 04:50:20 BST

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