Subject: FVWM: FvwmButtons again

From: [email-masked]
Date: Mon, 4 Mar 1996 22:52:07 +0100 (MET)

Seems there was a serious bug left in FvwmButtons-020396 which made it 
choke on most button configurations. New version which should be fairly
stable is made available at the same place

  http://www.fm.unit.no/~jatotal/fvwm.html

Seems that page is finally seeing some hits :-) So I put up a nice large
example with some menus and stuff. Enjoy.

Vyrdsamt,
-Jarl
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Olly Stephens <[email-masked]>
Date: Tue, 05 Mar 1996 11:40:13 -0800

In your message to [email-masked] you wrote:
|> 
|> Seems there was a serious bug left in FvwmButtons-020396 which made it 
|> choke on most button configurations. New version which should be fairly
|> stable is made available at the same place
|> 
|>   http://www.fm.unit.no/~jatotal/fvwm.html
|> 
|> Seems that page is finally seeing some hits :-) So I put up a nice large
|> example with some menus and stuff. Enjoy.

This new version appears to be sound.  Nice work!

Two caveats though:

  1. the new code relies on an XPM feature that is new with version 3.4g
     (the latest is 3.4h).  I was quite happily building fvwm with 3.4f
     before these changes came along.  I've upgraded now and everything
     is cool.

  2. the new code handles the search for bitmaps/pixmaps slightly differently.
     In some respects it's better because it now tells you when it encounters
     errors but the outcome of this for me was two-fold

       A. I had the same directory in my PixmapPath and my IconPath.  Before
          the code would fail to read a xpm file as a bitmap but would then
          try again and succeed to read it as a pixmap.  The new code stops
          at the first failure.  I simply changed by IconPath so that it
          didn't clash with my PixmapPath

       B. the "whatever" mode for selecting no icon now gives an error
          message (before it was just silently ignored).  I just changed
          my entries to use "-" when I don't want a pixmap which is what
          the new manual tells you to do.

Now, there's one more feature that I would really like to see;  I'd like
to be able to set up a button that would, given a window name,
start the program and wait for the window to come up (like the default)
unless a window with that name already existed in which case it would
warp the desktop to that window.

As an example, I'd like my FrameMaker button to only ever start one copy - if
I press it and FrameMaker is already running, it should just change to the
desk that it's on.

Oh yeah, another one;  It'd be nice if the button depressing had a timeout
value which would cause it to pop back up even though the window it was
looking for didn't come up.

Other than that, I'm happy with what it does.  I'm gonna rearrange my
buttons now to make them look cool....

Olly

---

From: <[email-masked]> (Charles Hines)
Date: Tue, 5 Mar 1996 14:54:12 -0500

>>>>> "Olly" == Olly Stephens <[email-masked]> writes:

Olly> Now, there's one more feature that I would really like to see;
Olly> I'd like to be able to set up a button that would, given a
Olly> window name, start the program and wait for the window to come
Olly> up (like the default) unless a window with that name already
Olly> existed in which case it would warp the desktop to that window.

Olly> As an example, I'd like my FrameMaker button to only ever start
Olly> one copy - if I press it and FrameMaker is already running, it
Olly> should just change to the desk that it's on.

RTFM.  You should be able to this now via a function and the 'None'
directive.  The example that shows this in fvwm2.man:

       AddToFunc MailFunction     "I" Next [$0] Iconify -1
       +                          "I" Next [$0] focus
       +                          "I" None [$0] Exec $0 $1

The 'None' line says only do this if no window matching $0 exists.
You should be able to use something like this with FrameMaker.

Chuck

---

From: Olly Stephens <[email-masked]>
Date: Tue, 05 Mar 1996 12:02:54 -0800

Charles Hines wrote:
|> 
|> RTFM.  You should be able to this now via a function and the 'None'
|> directive.  The example that shows this in fvwm2.man:
|> 
|>        AddToFunc MailFunction     "I" Next [$0] Iconify -1
|>        +                          "I" Next [$0] focus
|>        +                          "I" None [$0] Exec $0 $1
|> 
|> The 'None' line says only do this if no window matching $0 exists.
|> You should be able to use something like this with FrameMaker.

Yes, but if I use such a function as a button-box command, it won't
do the button depressing stuff because it only looks for "Exec"
commands.  I don't think there's a general solution to this problem
short of adding support into the button-box module.

Olly

---

From: Dave Goldberg <[email-masked]>
Date: Tue, 05 Mar 1996 15:24:06 -0500

You can do this with an fvwm function.  I defined

AddToFunc warp-or-run "I" Next [$0 CirculateHit] Iconify -1
+ "I" Next [$0 CirculateHit] Focus
+ "I" None [$0] $1

And as part of my main menu definition I have:

+ "&Emacs" Function warp-or-run Emacs "Exec xcmd emacs"
+ "&Netscape" Function warp-or-run Netscape "Exec xcmd netscape"

I just tried it (with the standard FvwmButtons) and it works there.  I
haven't had a chance to build Jarl's FvwmButtons yet, but from the
docs it looks like it should work there as well.

Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 617-271-3887
Email: [email-masked]