Bug 1684565 - Consolidate rewrap and pasteQuote into editorOverlay. r=frg
This commit is contained in:
Родитель
c2cd5e953b
Коммит
04e146d4fc
|
@ -2599,9 +2599,11 @@ var nsRewrapCommand = {
|
|||
doCommandParams(aCommand, aParams, aRefCon) {},
|
||||
|
||||
doCommand(aCommand) {
|
||||
// We only want to respect new lines when using the web composer.
|
||||
let respectNewLines = IsWebComposer();
|
||||
GetCurrentEditor()
|
||||
.QueryInterface(Ci.nsIEditorMailSupport)
|
||||
.rewrap(false);
|
||||
.rewrap(respectNewLines);
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -1916,9 +1916,11 @@ function SetEditMode(mode) {
|
|||
// Disable spell checking when previewing
|
||||
InlineSpellCheckerUI.enabled = false;
|
||||
inlineSpellCheckItem.removeAttribute("checked");
|
||||
// fall through
|
||||
inlineSpellCheckItem.setAttribute("disabled", true);
|
||||
break;
|
||||
case kDisplayModeSource:
|
||||
inlineSpellCheckItem.setAttribute("disabled", "true");
|
||||
inlineSpellCheckItem.setAttribute("disabled", true);
|
||||
goSetCommandEnabled("cmd_pasteQuote", false);
|
||||
break;
|
||||
default:
|
||||
inlineSpellCheckItem.setAttribute(
|
||||
|
|
|
@ -44,6 +44,10 @@
|
|||
key="&pasteNoFormatting.key;"
|
||||
command="cmd_pasteNoFormatting"
|
||||
modifiers="accel, shift"/>
|
||||
<key id="key_rewrap"
|
||||
key="&editRewrapCmd.key;"
|
||||
command="cmd_rewrap"
|
||||
modifiers="accel"/>
|
||||
<keyset id="findKeys"/>
|
||||
<key id="key_checkspelling"
|
||||
key="&checkSpellingCmd2.key;"
|
||||
|
@ -170,8 +174,10 @@
|
|||
<command id="cmd_cut"/>
|
||||
<command id="cmd_copy"/>
|
||||
<command id="cmd_paste"/>
|
||||
<command id="cmd_pasteNoFormatting" oncommand="goDoCommand('cmd_pasteNoFormatting')"
|
||||
label="&pasteNoFormatting.label;" accesskey="&pasteNoFormatting.accesskey;"/>
|
||||
<command id="cmd_pasteNoFormatting"
|
||||
label="&pasteNoFormatting.label;"
|
||||
accesskey="&pasteNoFormatting.accesskey;"
|
||||
oncommand="goDoCommand('cmd_pasteNoFormatting');"/>
|
||||
<command id="cmd_delete"/>
|
||||
<command id="cmd_selectAll"/>
|
||||
<command id="cmd_preferences" oncommand="goDoCommand('cmd_preferences')"/>
|
||||
|
@ -184,6 +190,7 @@
|
|||
label="&pasteAsQuotationCmd.label;"
|
||||
accesskey="&pasteAsQuotationCmd.accesskey;"
|
||||
oncommand="goDoCommand('cmd_pasteQuote');"/>
|
||||
<command id="cmd_rewrap" oncommand="goDoCommand('cmd_rewrap');"/>
|
||||
</commandset>
|
||||
|
||||
<!-- style related commands that update on creation, and on selection change -->
|
||||
|
@ -308,6 +315,14 @@
|
|||
<menuitem id="menu_pasteNoFormatting"
|
||||
key="pastenoformattingkb"
|
||||
command="cmd_pasteNoFormatting"/>
|
||||
<menuitem id="menu_pasteQuote"
|
||||
key="pastequotationkb"
|
||||
command="cmd_pasteQuote"/>
|
||||
<menuitem id="menu_rewrap"
|
||||
label="&editRewrapCmd.label;"
|
||||
accesskey="&editRewrapCmd.accesskey;"
|
||||
key="key_rewrap"
|
||||
command="cmd_rewrap"/>
|
||||
<menuitem id="menu_delete"/>
|
||||
<menuseparator id="sep_selectAll"/>
|
||||
<menuitem id="menu_selectAll"/>
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<!ENTITY pasteAsQuotationCmd.label "Paste As Quotation">
|
||||
<!ENTITY pasteAsQuotationCmd.accesskey "Q">
|
||||
<!ENTITY pasteAsQuotationCmd.key "o">
|
||||
<!ENTITY editRewrapCmd.label "Rewrap">
|
||||
<!ENTITY editRewrapCmd.key "R">
|
||||
<!ENTITY editRewrapCmd.accesskey "w">
|
||||
<!ENTITY findBarCmd.label "Find…">
|
||||
<!ENTITY findReplaceCmd.label "Find and Replace…">
|
||||
<!ENTITY enableInlineSpellChecker.label "Spellcheck As You Type">
|
||||
|
|
|
@ -27,11 +27,6 @@
|
|||
<menuitem label="&outputHTMLCmd.label;"
|
||||
oncommand="EditorGetHTML()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_pasteQuote"
|
||||
key="pastequotationkb"
|
||||
command="cmd_pasteQuote"/>
|
||||
<menuitem label="&editRewrapCmd.label;"
|
||||
oncommand="try { GetCurrentEditor().rewrap(true); } catch (e) {}"/>
|
||||
<menuitem label="&editStripQuotesCmd.label;"
|
||||
oncommand="try { GetCurrentEditor().stripCites(); } catch (e) {}"/>
|
||||
<menuitem label="&insertTextCmd.label;"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
<!ENTITY statusText.label "Done loading page">
|
||||
<!ENTITY editStripQuotesCmd.label "Strip Quotes">
|
||||
<!ENTITY editRewrapCmd.label "Rewrap">
|
||||
<!ENTITY insertFormMenu.label "Form">
|
||||
<!ENTITY insertFormMenu.accesskey "F">
|
||||
<!ENTITY insertFormCmd.label "Define Form…">
|
||||
|
@ -52,6 +51,3 @@
|
|||
<!ENTITY insertFieldSetCmd.accesskey "F">
|
||||
<!ENTITY insertIsIndexCmd.label "Index Search">
|
||||
<!ENTITY insertIsIndexCmd.accesskey "x">
|
||||
|
||||
<!ENTITY pasteAsQuotationCmd.label "Paste As Quotation">
|
||||
<!ENTITY pasteAsQuotationCmd.accesskey "Q">
|
||||
|
|
|
@ -48,9 +48,6 @@
|
|||
<!ENTITY sendLaterCmd.accesskey "L">
|
||||
|
||||
<!-- Edit menu items -->
|
||||
<!ENTITY editRewrapCmd.label "Rewrap">
|
||||
<!ENTITY editRewrapCmd.key "R">
|
||||
<!ENTITY editRewrapCmd.accesskey "w">
|
||||
<!ENTITY accountManagerCmd.label "Mail & Newsgroups Account Settings…">
|
||||
<!ENTITY accountManagerCmd.accesskey "m">
|
||||
|
||||
|
|
|
@ -7,14 +7,6 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<menupopup id="menu_EditPopup" onpopupshowing="updateEditItems();">
|
||||
<menuitem id="menu_pasteQuote"
|
||||
insertafter="menu_pasteNoFormatting"
|
||||
key="pastequotationkb"
|
||||
command="cmd_pasteQuote"/>
|
||||
<menuitem id="menu_rewrap"
|
||||
insertafter="menu_pasteQuote"
|
||||
key="key_rewrap"
|
||||
command="cmd_rewrap"/>
|
||||
<menuitem id="menu_inlineSpellCheck"
|
||||
oncommand="EnableInlineSpellCheck(!InlineSpellCheckerUI.enabled);"/>
|
||||
<menuitem id="menu_accountmgr"
|
||||
|
|
|
@ -103,10 +103,6 @@
|
|||
<!--command id="cmd_find"/-->
|
||||
<!--command id="cmd_findNext"/-->
|
||||
<!--command id="cmd_findReplace"/-->
|
||||
<command id="cmd_rewrap"
|
||||
label="&editRewrapCmd.label;"
|
||||
accesskey="&editRewrapCmd.accesskey;"
|
||||
oncommand="goDoCommand('cmd_rewrap');"/>
|
||||
<command id="cmd_renameAttachment" oncommand="goDoCommand('cmd_renameAttachment')" disabled="true"/>
|
||||
<command id="cmd_openAttachment" oncommand="goDoCommand('cmd_openAttachment')"/>
|
||||
<command id="cmd_account"
|
||||
|
@ -136,9 +132,6 @@
|
|||
<key id="key_send" keycode="&sendCmd.keycode;" observes="cmd_sendWithCheck" modifiers="accel"/>
|
||||
<key id="key_sendLater" keycode="&sendLaterCmd.keycode;" observes="cmd_sendLater" modifiers="accel, shift"/>
|
||||
|
||||
<!-- Edit Menu -->
|
||||
<key id="key_rewrap" key="&editRewrapCmd.key;" command="cmd_rewrap" modifiers="accel"/>
|
||||
|
||||
<!-- Options Menu -->
|
||||
<!-- key id="key_selectAddresses" key="&selectAddressCmd.key;" command="cmd_selectAddress"/ -->
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче