[opensource-dev] Toggle menu item

Bo Rossen bo.rossen at gmail.com
Fri Sep 3 02:46:28 PDT 2010

Dear List,

Completely new to SecondLife viewer development, so please be gentle ;)

In the light of all the Emerald issues, I have decided that the only viewer
I am going to trust, is one that I build myself.
For this I have created a complete Lenny chroot on my linux box, installed
all the neccesary libraries, packages and Snowglobe 2009 sources.

I want to start out simple by just creating personal patches that apply
directly to the mainstream Snowglobe sources.
As this is a personal and private viewer, I won't be releasing it to the
public (but I might do so for the patches).

My first objective is to add a menu item to the bottom of the tools menu,
allowing to show the debug menu.
The reason for this, is that the default shortcut Control-Alt-Shift-D is
already taken by my OS (and thus kinda annoying).

I have patched indra/newview/skins/default/xui/en-us/menu_viewer.xml to have
the menu item become visible.
I have also patched indra/newview/llviewermenu.cpp to add functionality to
the button.

All seems well. When I click the menu item it indeed "toggles" the
visibility of the debug menu *YAY*
However, in the Emerald viewer (which also contains this very same menu item
but in a different place) the menu item is ALSO toggled.
Eg the menu item has a nice 'X' in front of it when it's "on".

My simple question: How do I duplicate this behavior?

Thanks in advance for any assistance,
Bo Rossen
bo dot rossen at gmail dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20100903/0ddedfe6/attachment-0001.htm 

More information about the opensource-dev mailing list