mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Fix for bug 24685 -- make some items on the navigator context menu pay attention to command nodes, so they get automagically enabled, and executed. r=Ben Goodger
This commit is contained in:
parent
e800f697c3
commit
1cf975ea2d
@ -192,11 +192,11 @@ Contributor(s): ______________________________________. -->
|
||||
<menuitem id="context-selectall"
|
||||
value="&selectAllCmd.label;"
|
||||
accesskey="&selectAllCmd.accesskey;"
|
||||
oncommand="BrowserSelectAll();"/>
|
||||
observes="cmd_selectAll"/>
|
||||
<menuitem id="context-copy"
|
||||
value="©Cmd.label;"
|
||||
accesskey="©Cmd.accesskey;"
|
||||
oncommand="BrowserCopy();"/>
|
||||
observes="cmd_copy"/>
|
||||
<menuitem id="context-copylink"
|
||||
value="©LinkCmd.label;"
|
||||
accesskey="©LinkCmd.accesskey;"
|
||||
@ -225,10 +225,12 @@ Contributor(s): ______________________________________. -->
|
||||
<!-- button area of personal toolbar -->
|
||||
<box align="horizontal" flex="1" style="min-width: 1px">
|
||||
|
||||
<!--
|
||||
// I added the container=true on this button as a temp hack until
|
||||
// we can get this button into rdf. We can't allow drags on this
|
||||
// container so we have to be able to identify it (bug 19588).
|
||||
// - pinkerton
|
||||
-->
|
||||
<menu id="PersonalMenu" datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
|
||||
ref="NC:BookmarksRoot">
|
||||
<titledbutton align="right" class="bookmarkFolder toolbar-flat" container="true"
|
||||
|
@ -66,11 +66,11 @@ Contributor(s): ______________________________________. -->
|
||||
<!-- File Menu -->
|
||||
<broadcaster id="cmd_newNavigator"/>
|
||||
<broadcaster id="cmd_newMessage"/>
|
||||
<broadcaster id="cmd_newCard"/>
|
||||
<broadcaster id="cmd_newEditor"/>
|
||||
<broadcaster id="cmd_newEditorTemplate"/>
|
||||
<broadcaster id="cmd_newEditorDraft"/>
|
||||
<broadcaster id="cmd_quit"/>
|
||||
<broadcaster id="cmd_newCard"/>
|
||||
<broadcaster id="cmd_newEditor"/>
|
||||
<broadcaster id="cmd_newEditorTemplate"/>
|
||||
<broadcaster id="cmd_newEditorDraft"/>
|
||||
<broadcaster id="cmd_quit"/>
|
||||
|
||||
<!-- Edit Menu -->
|
||||
<broadcaster id="cmd_undo"/>
|
||||
|
@ -131,7 +131,9 @@ nsContextMenu.prototype = {
|
||||
// Select All is always OK.
|
||||
|
||||
// Copy depends on whether there is selected text.
|
||||
this.setItemAttr( "context-copy", "disabled", this.isNoTextSelected() );
|
||||
// Enabling this context menu item is now done through the global
|
||||
// command updating system
|
||||
// this.setItemAttr( "context-copy", "disabled", this.isNoTextSelected() );
|
||||
|
||||
// Copy link location depends on whether we're on a link.
|
||||
this.showItem( "context-copylink", this.onLink );
|
||||
|
@ -178,7 +178,7 @@ function goSetMenuValue(command, valueAttribute)
|
||||
|
||||
function goUpdateGlobalEditMenuItems()
|
||||
{
|
||||
dump("Updating edit menu items\n");
|
||||
//dump("Updating edit menu items\n");
|
||||
goUpdateCommand('cmd_undo');
|
||||
goUpdateCommand('cmd_redo');
|
||||
goUpdateCommand('cmd_cut');
|
||||
@ -192,7 +192,7 @@ function goUpdateGlobalEditMenuItems()
|
||||
// update menu items that rely on the current selection
|
||||
function goUpdateSelectEditMenuItems()
|
||||
{
|
||||
dump("Updating select menu items\n");
|
||||
//dump("Updating select menu items\n");
|
||||
goUpdateCommand('cmd_cut');
|
||||
goUpdateCommand('cmd_copy');
|
||||
goUpdateCommand('cmd_delete');
|
||||
@ -201,7 +201,7 @@ function goUpdateSelectEditMenuItems()
|
||||
// update menu items that relate to undo/redo
|
||||
function goUpdateUndoEditMenuItems()
|
||||
{
|
||||
dump("Updating undo/redo menu items\n");
|
||||
//dump("Updating undo/redo menu items\n");
|
||||
goUpdateCommand('cmd_undo');
|
||||
goUpdateCommand('cmd_redo');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user