Fix for nsbeta2+ bug 31134 -- paste in edit menu not enabled correctly. Add a new command set for clipboard-related menu items, and fire it on Copy. Also ensure that Undo/Redo commands are updated correctly, and avoid bogus command updating in plain text compose (since that caused JS errors). r=kin,jfrancis.

This commit is contained in:
sfraser%netscape.com 2006-07-29 05:34:24 +00:00
Родитель 0e635f018e
Коммит e0b6f16ccc
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -205,7 +205,6 @@ function goUpdateGlobalEditMenuItems()
goUpdateCommand('cmd_cut');
goUpdateCommand('cmd_copy');
goUpdateCommand('cmd_paste');
goUpdateCommand('cmd_pasteQuote');
goUpdateCommand('cmd_selectAll');
goUpdateCommand('cmd_delete');
}
@ -225,10 +224,13 @@ function goUpdateUndoEditMenuItems()
//dump("Updating undo/redo menu items\n");
goUpdateCommand('cmd_undo');
goUpdateCommand('cmd_redo');
}
// we shouldn't really do this here, but we don't get the right notifications now
// update menu items that depend on clipboard contents
function goUpdatePasteMenuItems()
{
//dump("Updating clipboard menu items\n");
goUpdateCommand('cmd_paste');
goUpdateCommand('cmd_pasteQuote');
}
// This used to be BrowserNewEditorWindow in navigator.js

Просмотреть файл

@ -72,6 +72,11 @@
commandupdater="true"
events="undo"
oncommandupdate="goUpdateUndoEditMenuItems()"/>
<commandset id="clipboardEditMenuItems"
commandupdater="true"
events="clipboard"
oncommandupdate="goUpdatePasteMenuItems()"/>
<broadcaster id="cmd_undo"
oncommand="goDoCommand('cmd_undo')"