Subject: FVWM: Usage of MenuStyle.

From: ddtl <[email-masked]>
Date: Sat, 06 Mar 2004 19:12:32 +0200

Hello everybody,

I have the following line in my .fvwm2rc:

MenuStyle black grey76 grey30 -adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-* fvwm

According to the man page:

------------------------------------------------
MenuStyle stylename options
     Sets a new menu style or changes a previously defined style.
------------------------------------------------

As i understand it, you don't *define* a new menu style with that
command, but only set it (that is, if till now menu style was "x"
and you want to change it to "y", you say: "MenuStyle y". Also, style
called "y" have to exist in order for this to work, because MenuStyle
could not create new styles)

*) Contrary to my understanding, using "MenuStyle mwm", for example,
from FvwmConsole does not set menu style - but why? The only way i
found to change something in a menu style is to use "MenuStyle * <options>".
Is it supposed to be so or did i miss something?

1) How do you define a new menu style - do you just copy one of the
existing menu styles into a new one with, say:

"CopyMenuStyle fvwm my_style"

creating that new style along the way and than change some of it's
properties? (Of course if the answer to previous question is that
there is only one changeable style - "*", the question is irrelevant,
though an existence of CopyMenuStyle suggests that many menu styles
can be defined)

2)The line from .fvwm2rc i mentioned at the beginning, what it is
supposed to do? Apparently, it does not contain stylename's name -
"black" is the name of color, as are grey76 & grey30. Also, it is
said in the man page that "options is a comma separated list
containing some of the keywords", and the mentioned line contains
only values for some of the properties without properties' names, so
seemingly it is not structured correctly.

ddtl.
--
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: ddtl <[email-masked]>
Date: Sun, 07 Mar 2004 01:53:54 +0200

ddtl wrote:
>...

Forgotten to mention: i use version 2.4.16

ddtl.

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 6 Mar 2004 18:47:10 +0000

On 06 Mar 2004 19:12:32 +0200, ddtl wrote:
> MenuStyle black grey76 grey30 
> -adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-* fvwm

This is a very ancient syntax that is still supported, but will be
removed.

The new corresponding syntax (works since fvwm-2.1.x, I think) is:

  MenuStyle * fvwm
  MenuStyle * Foreground black, Background grey76, HilightBack grey30
  MenuStyle * Font -adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*

You may combine this into one long MenuStyle command too if you like.
Is the man page content more clear now?

And if we are at it, older color and pixmap related options (Foreground,
Background, MenuFace) are better to be replaced with colorset options
(MenuColorset, ActiveColorset, GreyedColorset).

Regards,
Mikhael.

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 7 Mar 2004 00:52:31 +0000

On 06 Mar 2004 19:12:32 +0200, ddtl wrote:
> from FvwmConsole does not set menu style - but why?

Because this is an invalid syntax for what you want.

> "CopyMenuStyle fvwm my_style"

This line only makes sence after these lines:

  CopyMenuStyle * fvwm    # actually optional, but you probably want it
  MenuStyle fvwm Font fixed, AnyOtherOptions YouWant

> though an existence of CopyMenuStyle suggests that many menu styles

You may use ChangeMenuStyle command to associate menus created using Menu
command with a menu style different than the default "*". This command is
documented in the man page:

  ChangeMenuStyle my_style MenuFvwmRoot MenuFvwmWindowOperations

Regards,
Mikhael.

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 7 Mar 2004 00:58:26 +0000

> You may use ChangeMenuStyle command to associate menus created using Menu

Correct a typo.  Either  s/created/invoked/  or  s/Menu/AddToMenu/.

Regards,
Mikhael.

---

From: ddtl <[email-masked]>
Date: Sun, 07 Mar 2004 08:53:40 +0200

>   MenuStyle fvwm Font fixed, AnyOtherOptions YouWant

So actually instead of "Sets a new menu style or changes a previously
defined style." in a definition of a MenuStyle command the man page
is supposed to say: "Defines a new menu style or changes a previously
defined one." - in effect it also answers to the next question.

>   ChangeMenuStyle my_style MenuFvwmRoot MenuFvwmWindowOperations

And is it possible to change style of all menus at once?
For example, if i have 100 menus (including those defined by AddToMenu
command and the built-in ones) and i want all of them to use my_fvwm
style, i don't want to enumerate all of them in ChangeMenuStyle, like:

ChangeMenuStyle my_style menu1, menu2, menu3 .... menu99 menu100

but i want say something short instead that will do the job, like:

ChangeMenuStyle my_style ALL_EXISTING_MENUS

How can i do that?

ddtl.

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 7 Mar 2004 10:30:36 +0000

> ChangeMenuStyle my_style ALL_EXISTING_MENUS

If you want one style for all your menus, then don't use commands
CopyMenuStyle and ChangeMenuStyle at all, use "MenuStyle * options", where
"*" if the default menu style name that every menu gets when created:

  MenuStyle * Font fixed

This command causes all menus to use fixed font, except for menus you
applied ChangeMenuStyle to them. Additionally, there is no automatical
copying or inheritance of menu styles, but it is not needed in your case.

If you think the man page may use a better wording, supply a patch to the
cvs version.

Regards,
Mikhael.