Subject: FVWM: Greyed out menu items

From: Marcus Lundblad <[email-masked]>
Date: Wed, 21 Aug 2002 18:27:25 +0200 (CEST)

When using for example motif tear-off menus, some menu entries used to be
"shaded out" because they are not useable (like an entry boud to Resize).
Now (I'm using 2.5.2) they never are (although there is a beep when trying
to use them).
I converted my setup to use Colorsets some time ago. Do you have to
specifically set a Colorset for the shaded out entries?
Is this why it fails to work?
Or is the menu code undergoing some rewrite now, and this has been
disabled?

//Marcus

--
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: Dominik Vogt <[email-masked]>
Date: Wed, 21 Aug 2002 18:42:12 +0200

> Or is the menu code undergoing some rewrite now, and this has been

Can you post the relevant parts of your config? (menu styles,
the corresponding menus and mouse bindings and the styles
controlling the actions that are allowed).

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
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: Mikhael Goikhman <[email-masked]>
Date: Wed, 21 Aug 2002 16:51:16 +0000

> controlling the actions that are allowed).

This is not needed. I fixed small this problem on 2002-06-28, four days
after the 2.5.2 release. :)

Regards,
Mikhael.

---

From: Marcus Lundblad <[email-masked]>
Date: Wed, 21 Aug 2002 19:58:10 +0200 (CEST)

> after the 2.5.2 release. :)

Another thought.

I have a function like this:

AddToFunc Restore		"I" Current [Iconic] Iconify false
+				"I" Cond (Match) Break
+				"I" Current [!Iconic] Maximize false

and an entry in a window menu for this.
Would it be very hard to extend the "greying out" functionality to handle
cases like this, marking this as unavailable for non-maximised windows
(since "Maximize false" only makes sense for maximised windows).
A similar thing is a menu I have with entries for switching desks,
switching to the current desk is also not "doing anything"

This is ofcourse only a cosmetic issue and is not the most important, so
I'm not saying this is something you should put a lot of energy into.

I guess it could be quite complex.

//Marcus

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 21 Aug 2002 18:11:51 +0000

> I guess it could be quite complex.

Yes, it is pretty impossible to implement, a compiler comparable task.
Especially when your function Restore works _always_, so I see no any
special reason to disable a menu item it is bound to.

On the other hand if you would rewrite this function to be:

  DestroyFunc Restore
  AddToFunc   Restore
  + I ThisWindow (!Iconic, !Shaded, Maximized) Maximize    false
  + I ThisWindow (!Iconic,  Shaded,          ) WindowShade false
  + I ThisWindow ( Iconic                    ) Iconify     false

it's easier to see that there is the case (!Iconic, !Shaded, !Maximized)
when nothing is executed. But it is still pretty impossible for the
generic case when you call other functions or PipeRead in your function.

I think, if there is any solution to this, it is to specify a condition
(!Iconic, !Shaded, !Maximized) at the menu item definition time that is
executed on every menu popup to find whether it should be disabled.

Regards,
Mikhael.