[Project_owners] Observers and whatnot

David Murray lid2000 at tpg.com.au
Sat Apr 10 13:23:47 EDT 2004


Okay... Near the top of the file I've got:

	<commandset id="selectEditMenuItems"/>
	<commandset id="globalEditMenuItems"/>
	<commandset id="undoEditMenuItems"/>
	<commandset id="clipboardEditMenuItems"/>

Then another commandset with:

	<command id="cmd_undo"/>
	<command id="cmd_redo"/>
	<command id="cmd_cut"/>
	<command id="cmd_copy"/>
	<command id="cmd_paste"/>
	<command id="cmd_delete"/>
	<command id="cmd_selectAll"/>

Followed by a keyset containing:

	<key id="key_undo"/>
	<key id="key_redo"/>
	<key id="key_cut"/>
	<key id="key_copy"/>
	<key id="key_paste"/>
	<key id="key_delete"/>
	<key id="key_selectAll"/>

And the actual Edit menu looks like this:

         <menu id="menu_Edit">
			<menupopup id="menu_Edit_Popup">
				<menuitem id="menu_cut"/>
				<menuitem id="menu_copy"/>
				<menuitem id="menu_paste"/>
				<menuitem id="menu_undo"/>
				<menuitem id="menu_redo"/>
				<menuseparator/>
				<menuitem id="menu_selectAll"/>
				<menuseparator/>
				<menuitem label="Check Spelling" id="menu_spell" command="cmd_spell" 
key="key_spell"/>
			</menupopup>
		</menu>

What happens is it works all fine in its own XUL window, but if its 
loaded into the sidebar, because there is already an Edit menu up the 
top of the screen (next to File, View, Options, etc), this one gets 
ignored. How can I make this secondary Edit menu just copy the behaviour 
of Fx's?

David.


HJ wrote:
> David Murray <lid2000 at tpg.com.au> wrote:
> 
> 
>>Hi, me again with yet another problem...
>>
>>Basically, the Edit menu (and context menu) in my app works all fine if 
>>its in its own window, but if I load it in the sidebar on Fx, it all 
>>appears greyed out. I finally realised because there is already a set of 
>>Edit things running (Edit menu etc), so now I'm trying to figure out how 
>>to get my menus to just observe the state of the main Edit menu and copy 
>>whatever it does... If that makes sense anyway. I've dug around all over 
>>Mozilla's source trying to find what controls it but I keep coming up 
>>with nothing. Any help would be greatly appreciated!
>>
>>David Murray.
> 
> 
> David,
> 
> Why don't you add one of your edit menu items as example. Also, are you using the correct ID's for the menu/menu items?
> 
> /HJ
> 
> __________________________________________________________________
> Introducing the New Netscape Internet Service. 
> Only $9.95 a month -- Sign up today at http://isp.netscape.com/register
> 
> Netscape. Just the Net You Need. 
> 
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 
> 
> 



More information about the Project_owners mailing list