On Fri, Jul 16, 2004 at 04:50:17PM -0300, romildo_at_uber.com.br wrote:
> Hi.
>
> I want to have entries in the window menu for toggling
> some aspects of the window like shading. I want this entry
> to be named accodingly to the actual state of the window.
> For instance, if the window is shaded, the menu entry
> shuld be "Shade", otherwise "Unshade".
>
> To solve this I am using dynamic menus, as can be seen
> in the attached file containing relavant parts of the
> configuration.
>
> This works with the title button 1, which is the window
> menu button. But it fails with the icons in the
> FvwmIconMan module. In this case the menu entries are
> not always named correctly, picking the wrong state
> (for instance, showing Deiconify instead of Iconify).
>
> Any hints on how to solve this problem?
The "Current" command works on the currently focused window. But
when you call the function from FvwmIconMan, the window you click
on may not be focused. Use "ThisWindow" instead of "Current".
> # A dynamic popup menu for the window operations
> # Some entries depend on the window state
>
> AddToMenu WindowMenu "Window" Title
> + DynamicPopupAction Function WindowMenuF
>
> DestroyFunc WindowMenuF
> AddToFunc WindowMenuF
> + I DestroyMenu recreate WindowMenu
> + I AddToMenu WindowMenu "Window" Title
> + I + "&Move" Move
> + I + "&Resize" Resize
> + I + "R&aise" Raise
> + I + "&Lower" Lower
> + I Current (Iconic) + "De&iconify" Iconify
> + I Current (!Iconic) + "&Iconify" Iconify
> + I Current (Sticky) + "Un&stick" Stick
> + I Current (!Sticky) + "&Stick" Stick
> + I Current (Shaded) + "Un&shade" WindowShade
> + I Current (!Shaded) + "&Shade" WindowShade
> + I Current (Maximized) + "Unma&ximize" Maximize layer grow grow
> + I Current (!Maximized) + "Ma&ximize" Maximize layer grow grow
> + I Current (!Maximized) + "Maximize &Vertical" Maximize layer 0 grow
> + I Current (!Maximized) + "Maximize &Horizontal" Maximize layer grow 0
^^^^^^^^^
+ I ThisWindow ...
> + I + "" Nop
> + I + "Move to &Desk" Popup MoveToDeskMenu
> + I + "Title Position" PopUp TitlePosMenu
> + I + "" Nop
> + I + "Identify" Module FvwmIdent
> + I + "ScrollBar" Module FvwmScroll 2 2
> + I + "Print" PrintFunction
> + I + "Print Reverse" PrintReverseFunction
> + I + "" Nop
> + I + "&Delete" Delete
> + I + "&Close" Close
> + I + "Destroy" Destroy
>
> # This one works
> Mouse 1 1 A Menu WindowMenu Nop
>
> # This one does not work for some entries
> *FvwmIconMan: Action Mouse 3 N \
> sendcommand 'Menu WindowMenu Rectangle +$[left]+$[top] 0 -100m'
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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.
- application/pgp-signature attachment: stored
Received on Mon Jul 19 2004 - 04:13:44 BST