New MenuStyle which forbids tear off

2006-08-04 Thread Serge (gentoosiast) Koksharov
  Hello,

I want new MenuStyle which disables ability to tear off menu. Reason:
because I have some dynamic menues like this:

Mouse 3 IST A Menu winmenu +0m +0

DestroyMenu winmenu
AddToMenu winmenu Window menu: Title
+ DynamicPopupAction Function MakeWinMenu

DestroyFunc MakeWinMenu
AddToFunc MakeWinMenu
+ I DestroyMenu recreate winmenu
+ I AddToMenu winmenu Window menu $[w.class]: Title
+ I ThisWindow (Shaded) + %menu-cbox_on.png%UnShade WindowShade
+ I TestRc (NoMatch) + %menu-cbox_off.png%Shade WindowShade
...skipped...

When user tear offs such dynamic menu, menu items in it no longer
working, because functions called without window context. I already
coded a patch which adds MenuStyle 'AllowTearOff/!AllowTearOff' (feel
free to offer another name for it) and I'll send it to the list if:

- core developers agree that proposed functionality is useful
- there are no other ways to solve described problem without this new
  MenuStyle.

Best wishes

-- 
Serge Koksharov, Free Software user  supporter
GPG public key ID: 0x3D330896 (pgp.mit.edu)
Key fingerprint: 5BC4 0475 CB03 6A31 0076  82C2 C240 72F0 3D33 0896


pgpguHLUMK3ej.pgp
Description: PGP signature


Re: New MenuStyle which forbids tear off

2006-08-04 Thread seventh guardian

On 8/4/06, Serge (gentoosiast) Koksharov [EMAIL PROTECTED] wrote:

  Hello,

I want new MenuStyle which disables ability to tear off menu. Reason:
because I have some dynamic menues like this:

Mouse 3 IST A Menu winmenu +0m +0

DestroyMenu winmenu
AddToMenu winmenu Window menu: Title
+ DynamicPopupAction Function MakeWinMenu

DestroyFunc MakeWinMenu
AddToFunc MakeWinMenu
+ I DestroyMenu recreate winmenu
+ I AddToMenu winmenu Window menu $[w.class]: Title
+ I ThisWindow (Shaded) + %menu-cbox_on.png%UnShade WindowShade
+ I TestRc (NoMatch) + %menu-cbox_off.png%Shade WindowShade
...skipped...

When user tear offs such dynamic menu, menu items in it no longer
working, because functions called without window context. I already
coded a patch which adds MenuStyle 'AllowTearOff/!AllowTearOff' (feel
free to offer another name for it) and I'll send it to the list if:

- core developers agree that proposed functionality is useful


I'm not a core dev, but I think this can be useful. On the other hand,
the menu only tears off if you specifically ask it to. So unless the
desktop is used by someone else, I guess I can live with just not
tearing it off in the first place :)


- there are no other ways to solve described problem without this new
  MenuStyle.



Cheers
 Renato


Best wishes

--
Serge Koksharov, Free Software user  supporter
GPG public key ID: 0x3D330896 (pgp.mit.edu)
Key fingerprint: 5BC4 0475 CB03 6A31 0076  82C2 C240 72F0 3D33 0896