Bug 606683 - Allow customization of toolbars in Composer and formatting toolbar in MailNews Composition - formatting toolbar part. r=frg DONTBUILD

This commit is contained in:
Ian Neal 2020-04-07 21:50:42 +01:00
Родитель cfa832291a
Коммит 753c560cdb
21 изменённых файлов: 150 добавлений и 240 удалений

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

@ -32,20 +32,6 @@ pref("editor.table.maintain_structure", true);
pref("editor.prettyprint", true);
pref("editor.toolbars.showbutton.bold", true);
pref("editor.toolbars.showbutton.italic", true);
pref("editor.toolbars.showbutton.underline", true);
pref("editor.toolbars.showbutton.DecreaseFontSize", true);
pref("editor.toolbars.showbutton.IncreaseFontSize", true);
pref("editor.toolbars.showbutton.ul", true);
pref("editor.toolbars.showbutton.ol", true);
pref("editor.toolbars.showbutton.outdent", true);
pref("editor.toolbars.showbutton.indent", true);
pref("editor.toolbars.showbutton.absolutePosition", true);
pref("editor.toolbars.showbutton.decreaseZIndex", true);
pref("editor.toolbars.showbutton.increaseZIndex", true);
pref("editor.history.url_maximum", 10);
pref("editor.publish.", "");

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

@ -46,7 +46,6 @@ function EditorOnLoad()
// XUL elements we use when switching from normal editor to edit source.
gContentWindowDeck = document.getElementById("ContentWindowDeck");
gFormatToolbar = document.getElementById("FormatToolbar");
gViewFormatToolbar = document.getElementById("viewFormatToolbar");
// Continue with normal startup.
EditorStartup(url, charset);
@ -177,9 +176,6 @@ function EditorStartup(aUrl, aCharset)
// such as file-related commands, HTML Source editing, Edit Modes...
SetupComposerWindowCommands();
ShowHideToolbarButtons();
gEditorToolbarPrefListener = new nsPrefListener(kEditorToolbarPrefs);
gCSSPrefListener = new nsPrefListener(kUseCssPref);
gReturnInParagraphPrefListener = new nsPrefListener(kCRInParagraphsPref);
Services.obs.addObserver(EditorCanClose, "quit-application-requested");
@ -203,7 +199,6 @@ function EditorShutdown()
{
Services.obs.removeObserver(EditorCanClose, "quit-application-requested");
gEditorToolbarPrefListener.shutdown();
gCSSPrefListener.shutdown();
gReturnInParagraphPrefListener.shutdown();

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

@ -55,7 +55,6 @@ var gSourceTextEditor = null;
var gContentWindowDeck;
var gFormatToolbar;
var gFormatToolbarHidden = false;
var gViewFormatToolbar;
var gChromeState;
var gColorObj = {
LastTextColor: "",
@ -75,7 +74,6 @@ var gColorObj = {
var gDefaultTextColor = "";
var gDefaultBackgroundColor = "";
var gCSSPrefListener;
var gEditorToolbarPrefListener;
var gReturnInParagraphPrefListener;
var gLocalFonts = null;
@ -95,49 +93,9 @@ var gFontSizeNames = [
var nsIFilePicker = Ci.nsIFilePicker;
var kEditorToolbarPrefs = "editor.toolbars.showbutton.";
var kUseCssPref = "editor.use_css";
var kCRInParagraphsPref = "editor.CR_creates_new_p";
function ShowHideToolbarSeparators(toolbar) {
// Make sure the toolbar actually exists.
if (!toolbar) {
return;
}
var childNodes = toolbar.childNodes;
var separator = null;
var hideSeparator = true;
for (var i = 0; childNodes[i].localName != "spacer"; i++) {
if (childNodes[i].localName == "toolbarseparator") {
if (separator) {
separator.hidden = true;
}
separator = childNodes[i];
} else if (!childNodes[i].hidden) {
if (separator) {
separator.hidden = hideSeparator;
}
separator = null;
hideSeparator = false;
}
}
}
function ShowHideToolbarButtons() {
let array = Services.prefs.getChildList(kEditorToolbarPrefs);
for (let i in array) {
let prefName = array[i];
let id = prefName.substr(kEditorToolbarPrefs.length);
let button =
document.getElementById(id + "Button") ||
document.getElementById(id + "-button");
if (button) {
button.hidden = !Services.prefs.getBoolPref(prefName);
}
}
ShowHideToolbarSeparators(document.getElementById("FormatToolbar"));
}
function nsPrefListener(prefName) {
this.startup(prefName);
}
@ -189,13 +147,6 @@ nsPrefListener.prototype = {
editor.isCSSEnabled = useCSS;
}
}
} else if (prefName.startsWith(kEditorToolbarPrefs)) {
let id = prefName.substr(kEditorToolbarPrefs.length) + "Button";
let button = document.getElementById(id);
if (button) {
button.hidden = !Services.prefs.getBoolPref(prefName);
ShowHideToolbarSeparators(button.parentNode);
}
} else if (editor && prefName == kCRInParagraphsPref) {
editor.returnInParagraphCreatesNewParagraph = Services.prefs.getBoolPref(
prefName
@ -369,7 +320,6 @@ var gEditorDocumentObserver = {
currently does), then this item shouldn't be hidden: */
HideItem("menu_pasteNoFormatting");
HideItem("cmd_viewFormatToolbar");
HideItem("cmd_viewEditModeToolbar");
HideItem("viewSep1");
@ -2007,7 +1957,7 @@ function SetDisplayMode(mode) {
// Hide the formatting toolbar if not already hidden
gFormatToolbarHidden = gFormatToolbar.hidden;
gFormatToolbar.hidden = true;
gViewFormatToolbar.hidden = true;
gFormatToolbar.setAttribute("hideinmenu", "true");
gSourceContentWindow.contentWindow.focus();
} else {
@ -2053,7 +2003,7 @@ function SetDisplayMode(mode) {
// Restore menus and toolbars
gFormatToolbar.hidden = gFormatToolbarHidden;
gViewFormatToolbar.hidden = false;
gFormatToolbar.removeAttribute("hideinmenu");
gContentWindow.focus();
}
@ -2686,7 +2636,6 @@ function RemoveInapplicableUIElements() {
HideItem("insertHTML");
HideItem("insertFormMenu");
HideItem("fileExportToText");
HideItem("viewFormatToolbar");
HideItem("viewEditModeToolbar");
}
}

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

@ -154,11 +154,6 @@
<menupopup id="view_toolbars_popup"
onpopupshowing="onViewToolbarsPopupShowing(event);"
oncommand="onViewToolbarCommand(event);">
<menuitem id="viewFormatToolbar"
label="&formattingToolbarCmd.label;"
accesskey="&formattingToolbarCmd.accesskey;"
type="checkbox"
command="cmd_viewFormatToolbar"/>
<menuitem id="viewEditModeToolbar"
label="&editmodeToolbarCmd.label;"
accesskey="&editmodeToolbarCmd.accesskey;"
@ -287,41 +282,37 @@
class="chromeclass-toolbar"
persist="collapsed"
grippytooltiptext="&formatToolbar.tooltip;"
toolbarname="&formattingToolbarCmd.label;"
accesskey="&formattingToolbarCmd.accesskey;"
customizable="true"
defaultset="paragraph-select-container,color-buttons-container,HighlightColorButton,separator,DecreaseFontSizeButton,IncreaseFontSizeButton,separator,boldButton,italicButton,underlineButton,separator,ulButton,olButton,outdentButton,indentButton,separator,align-left-button,align-center-button,align-right-button,align-justify-button,absolutePositionButton,decreaseZIndexButton,increaseZIndexButton"
mode="icons"
iconsize="small"
defaultmode="icons"
defaulticonsize="small"
context="toolbar-context-menu"
nowindowdrag="true">
<!-- from editorOverlay -->
<toolbaritem id="paragraph-select-container"/>
<toolbaritem id="color-buttons-container"
disableoncustomize="true"/>
<toolbarbutton id="HighlightColorButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<!-- Enable if required for SeaMonkey.
<toolbarbutton id="AbsoluteFontSizeButton"/>
-->
<toolbarbutton id="DecreaseFontSizeButton"/>
<toolbarbutton id="IncreaseFontSizeButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="boldButton"/>
<toolbarbutton id="italicButton"/>
<toolbarbutton id="underlineButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="ulButton"/>
<toolbarbutton id="olButton"/>
<toolbarbutton id="outdentButton"/>
<toolbarbutton id="indentButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="align-left-button"/>
<toolbarbutton id="align-center-button"/>
<toolbarbutton id="align-right-button"/>
<toolbarbutton id="align-justify-button"/>
<toolbarbutton id="absolutePositionButton"/>
<toolbarbutton id="decreaseZIndexButton"/>
<toolbarbutton id="increaseZIndexButton"/>

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

@ -288,8 +288,6 @@
<command id="cmd_newEditor"/>
<command id="cmd_newEditorTemplate"/>
<command id="cmd_newEditorDraft"/>
<!-- view menu -->
<command id="cmd_viewFormatToolbar" oncommand="goToggleToolbar('FormatToolbar','cmd_viewFormatToolbar');" checked="true"/>
</commandset>
<popupset id="editorPopupSet">
@ -1002,6 +1000,8 @@
<toolbarbutton id="AlignPopupButton"
class="formatting-button"
label="&AlignPopupButton.label;"
removable="true"
tooltiptext="&AlignPopupButton.tooltip;"
type="menu"
observes="cmd_align">
@ -1023,6 +1023,8 @@
<toolbarbutton id="InsertPopupButton"
class="formatting-button"
label="&InsertPopupButton.label;"
removable="true"
tooltiptext="&InsertPopupButton.tooltip;"
type="menu"
observes="cmd_renderedHTMLEnabler">
@ -1074,7 +1076,7 @@
label="&printToolbarCmd.label;"
removable="true"
tooltiptext="&printToolbarCmd.tooltip;"/>
<!-- 'printSetupToolbar' is merged in here from platformGlobalOverlay.xhtml -->
<!-- 'print-button' is merged in here from utilityOverlay.xhtml -->
<toolbarbutton id="findButton"
class="toolbarbutton-1"
@ -1122,6 +1124,9 @@
<!-- Formatting toolbar items. "value" are HTML tagnames, don't translate -->
<toolbaritem id="paragraph-select-container"
class="formatting-button"
title="&ParagraphSelect.title;"
align="center"
removable="true"
tooltiptext="&ParagraphSelect.tooltip;"
observes="cmd_renderedHTMLEnabler">
<menulist id="ParagraphSelect"
@ -1147,6 +1152,9 @@
<!-- "value" are HTML tagnames, don't translate -->
<toolbaritem id="font-face-select-container"
class="formatting-button"
title="&FontFaceSelect.title;"
align="center"
removable="true"
tooltiptext="&FontFaceSelect.tooltip;"
observes="cmd_renderedHTMLEnabler">
<menulist id="FontFaceSelect"
@ -1180,6 +1188,9 @@
<toolbaritem id="font-size-select-container"
class="formatting-button"
title="&FontSizeSelect.title;"
align="center"
removable="true"
tooltiptext="&FontSizeSelect.tooltip;">
<menulist id="FontSizeSelect"
class="toolbar-focustarget"
@ -1200,6 +1211,8 @@
<toolbaritem id="color-buttons-container"
align="center"
title="&colorButtons.title;"
removable="true"
class="formatting-button">
<stack id="ColorButtons" align="center">
<observes element="cmd_fontColor" attribute="state" onbroadcast="onFontColorChange()"/>
@ -1214,6 +1227,8 @@
</toolbaritem>
<toolbarbutton id="HighlightColorButton"
class="formatting-button"
label="&HighlightColorButton.label;"
removable="true"
tooltiptext="&HighlightColorButton.tooltip;"
command="cmd_highlight">
<observes element="cmd_highlight" attribute="state" onbroadcast="onHighlightColorChange()"/>
@ -1222,6 +1237,8 @@
<toolbarbutton id="AbsoluteFontSizeButton"
class="formatting-button"
label="&absoluteFontSize.label;"
removable="true"
tooltiptext="&absoluteFontSizeToolbarCmd.tooltip;"
type="menu"
observes="cmd_renderedHTMLEnabler">
@ -1259,14 +1276,20 @@
</toolbarbutton>
<toolbarbutton id="DecreaseFontSizeButton"
class="formatting-button"
label="&smaller.label;"
removable="true"
tooltiptext="&decreaseFontSizeToolbarCmd.tooltip;"
command="cmd_decreaseFontStep"/>
<toolbarbutton id="IncreaseFontSizeButton"
class="formatting-button"
label="&larger.label;"
removable="true"
tooltiptext="&increaseFontSizeToolbarCmd.tooltip;"
command="cmd_increaseFontStep"/>
<toolbarbutton id="boldButton"
class="formatting-button"
label="&bold.label;"
removable="true"
tooltiptext="&boldToolbarCmd.tooltip;"
type="checkbox"
autoCheck="false"
@ -1275,6 +1298,8 @@
</toolbarbutton>
<toolbarbutton id="italicButton"
class="formatting-button"
label="&italic.label;"
removable="true"
tooltiptext="&italicToolbarCmd.tooltip;"
type="checkbox"
autoCheck="false"
@ -1283,6 +1308,8 @@
</toolbarbutton>
<toolbarbutton id="underlineButton"
class="formatting-button"
label="&underline.label;"
removable="true"
tooltiptext="&underlineToolbarCmd.tooltip;"
type="checkbox"
autoCheck="false"
@ -1292,6 +1319,8 @@
<toolbarbutton id="ulButton"
class="formatting-button"
label="&bullets.label;"
removable="true"
tooltiptext="&bulletListToolbarCmd.tooltip;"
type="radio"
group="lists"
@ -1302,6 +1331,8 @@
<toolbarbutton id="olButton"
class="formatting-button"
label="&numbers.label;"
removable="true"
tooltiptext="&numberListToolbarCmd.tooltip;"
type="radio"
group="lists"
@ -1312,16 +1343,22 @@
<toolbarbutton id="outdentButton"
class="formatting-button"
label="&outdent.label;"
removable="true"
tooltiptext="&outdentToolbarCmd.tooltip;"
command="cmd_outdent"/>
<toolbarbutton id="indentButton"
class="formatting-button"
label="&indent.label;"
removable="true"
tooltiptext="&indentToolbarCmd.tooltip;"
command="cmd_indent"/>
<!-- alignment buttons -->
<toolbarbutton id="align-left-button"
class="formatting-button"
label="&alignLeftButton.label;"
removable="true"
tooltiptext="&alignLeftButton.tooltip;"
type="radio"
group="align"
@ -1332,6 +1369,8 @@
</toolbarbutton>
<toolbarbutton id="align-center-button"
class="formatting-button"
label="&alignCenterButton.label;"
removable="true"
tooltiptext="&alignCenterButton.tooltip;"
type="radio"
group="align"
@ -1342,6 +1381,8 @@
</toolbarbutton>
<toolbarbutton id="align-right-button"
class="formatting-button"
label="&alignRightButton.label;"
removable="true"
tooltiptext="&alignRightButton.tooltip;"
type="radio"
group="align"
@ -1352,6 +1393,8 @@
</toolbarbutton>
<toolbarbutton id="align-justify-button"
class="formatting-button"
label="&alignJustifyButton.label;"
removable="true"
tooltiptext="&alignJustifyButton.tooltip;"
type="radio"
group="align"
@ -1363,6 +1406,8 @@
<toolbarbutton id="absolutePositionButton"
class="formatting-button"
label="&absolutePosition.label;"
removable="true"
tooltiptext="&layer.tooltip;"
type="checkbox"
command="cmd_absPos">
@ -1370,16 +1415,22 @@
</toolbarbutton>
<toolbarbutton id="decreaseZIndexButton"
class="formatting-button"
label="&decreaseZIndex.label;"
removable="true"
tooltiptext="&layerSendToBack.tooltip;"
command="cmd_decreaseZIndex"/>
<toolbarbutton id="increaseZIndexButton"
class="formatting-button"
label="&increaseZIndex.label;"
removable="true"
tooltiptext="&layerBringToFront.tooltip;"
command="cmd_increaseZIndex"/>
<!-- smiley menu -->
<toolbarbutton id="smileButtonMenu"
class="formatting-button"
label="&SmileButton.label;"
removable="true"
tooltiptext="&SmileButton.tooltip;"
type="menu"
observes="cmd_smiley">

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

@ -43,11 +43,6 @@
prefpane="editing_pane"
url="chrome://editor/content/pref-editing.xhtml"
helpTopic="composer_prefs_newpage"/>
<treeitem id="toolbarsItem"
label="&toolbars.label;"
prefpane="toolbars_pane"
url="chrome://editor/content/pref-toolbars.xhtml"
helpTopic="composer_prefs_toolbars"/>
</treechildren>
</treeitem>
</treechildren>

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

@ -1,99 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://editor/locale/pref-toolbars.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<prefpane id="toolbars_pane"
label="&pref.toolbars.title;">
<preferences id="toolbars_preferences">
<preference id="editor.toolbars.showbutton.DecreaseFontSize"
name="editor.toolbars.showbutton.DecreaseFontSize"
type="bool"/>
<preference id="editor.toolbars.showbutton.IncreaseFontSize"
name="editor.toolbars.showbutton.IncreaseFontSize"
type="bool"/>
<preference id="editor.toolbars.showbutton.bold"
name="editor.toolbars.showbutton.bold"
type="bool"/>
<preference id="editor.toolbars.showbutton.absolutePosition"
name="editor.toolbars.showbutton.absolutePosition"
type="bool"/>
<preference id="editor.toolbars.showbutton.ul"
name="editor.toolbars.showbutton.ul"
type="bool"/>
<preference id="editor.toolbars.showbutton.ol"
name="editor.toolbars.showbutton.ol"
type="bool"/>
<preference id="editor.toolbars.showbutton.italic"
name="editor.toolbars.showbutton.italic"
type="bool"/>
<preference id="editor.toolbars.showbutton.decreaseZIndex"
name="editor.toolbars.showbutton.decreaseZIndex"
type="bool"/>
<preference id="editor.toolbars.showbutton.outdent"
name="editor.toolbars.showbutton.outdent"
type="bool"/>
<preference id="editor.toolbars.showbutton.indent"
name="editor.toolbars.showbutton.indent"
type="bool"/>
<preference id="editor.toolbars.showbutton.underline"
name="editor.toolbars.showbutton.underline"
type="bool"/>
<preference id="editor.toolbars.showbutton.increaseZIndex"
name="editor.toolbars.showbutton.increaseZIndex"
type="bool"/>
</preferences>
<groupbox orient="horizontal">
<label class="header">&formatting.caption;</label>
<vbox flex="1">
<checkbox id="showSmaller"
label="&smaller.label;"
preference="editor.toolbars.showbutton.DecreaseFontSize"/>
<checkbox id="showLarger"
label="&larger.label;"
preference="editor.toolbars.showbutton.IncreaseFontSize"/>
<checkbox id="showBold"
label="&bold.label;"
preference="editor.toolbars.showbutton.bold"/>
<checkbox id="showAbsolutePosition"
label="&absolutePosition.label;"
preference="editor.toolbars.showbutton.absolutePosition"/>
</vbox>
<vbox flex="1">
<checkbox id="showBullets"
label="&bullets.label;"
preference="editor.toolbars.showbutton.ul"/>
<checkbox id="showNumbers"
label="&numbers.label;"
preference="editor.toolbars.showbutton.ol"/>
<checkbox id="showItalic"
label="&italic.label;"
preference="editor.toolbars.showbutton.italic"/>
<checkbox id="showDecreaseZIndex"
label="&decreaseZIndex.label;"
preference="editor.toolbars.showbutton.decreaseZIndex"/>
</vbox>
<vbox flex="1">
<checkbox id="showOutdent"
label="&outdent.label;"
preference="editor.toolbars.showbutton.outdent"/>
<checkbox id="showIndent"
label="&indent.label;"
preference="editor.toolbars.showbutton.indent"/>
<checkbox id="showUnderline"
label="&underline.label;"
preference="editor.toolbars.showbutton.underline"/>
<checkbox id="showIncreaseZIndex"
label="&increaseZIndex.label;"
preference="editor.toolbars.showbutton.increaseZIndex"/>
</vbox>
</groupbox>
</prefpane>
</overlay>

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

@ -91,7 +91,6 @@ comm.jar:
content/editor/editorOverlay.xhtml (composer/content/editorOverlay.xhtml)
content/editor/editingOverlay.xhtml (composer/content/editingOverlay.xhtml)
content/editor/composerOverlay.xhtml (composer/content/composerOverlay.xhtml)
content/editor/pref-toolbars.xhtml (composer/content/pref-toolbars.xhtml)
content/editor/pref-editing.xhtml (composer/content/pref-editing.xhtml)
content/editor/pref-editing.js (composer/content/pref-editing.js)
content/editor/pref-composer.xhtml (composer/content/pref-composer.xhtml)

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

@ -11,8 +11,6 @@
<!ENTITY pasteNoFormatting.label "Paste Without Formatting">
<!ENTITY pasteNoFormatting.accesskey "n">
<!ENTITY pasteNoFormatting.key "V">
<!ENTITY pasteAs.label "Paste As">
<!ENTITY pasteAs.accesskey "a">
<!ENTITY pasteAsQuotationCmd.label "Paste As Quotation">
<!ENTITY pasteAsQuotationCmd.accesskey "Q">
<!ENTITY pasteAsQuotationCmd.key "o">
@ -54,6 +52,7 @@
<!ENTITY editLinkCmd.accesskey "i">
<!-- Font Face SubMenu -->
<!ENTITY FontFaceSelect.title "Font">
<!ENTITY FontFaceSelect.tooltip "Choose a font">
<!ENTITY fontfaceMenu.label "Font">
<!ENTITY fontfaceMenu.accesskey "F">
@ -70,6 +69,7 @@
<!ENTITY fontCourier.accesskey "C">
<!-- Font Size SubMenu -->
<!ENTITY FontSizeSelect.title "Font Size">
<!ENTITY FontSizeSelect.tooltip "Choose a font size">
<!ENTITY decreaseFontSize.label "Smaller">
<!ENTITY decreaseFontSize.accesskey "r">
@ -180,6 +180,7 @@
<!ENTITY listPropsCmd.label "List Properties…">
<!ENTITY listPropsCmd.accesskey "L">
<!ENTITY ParagraphSelect.title "Paragraph">
<!ENTITY ParagraphSelect.tooltip "Choose a paragraph format">
<!-- Shared in Paragraph, and Toolbar menulist -->
<!ENTITY bodyTextCmd.label "Body Text">
@ -205,8 +206,11 @@
<!ENTITY alignJustify.tooltip "Align Justified">
<!-- Layer toolbar items -->
<!ENTITY absolutePosition.label "Positioning">
<!ENTITY layer.tooltip "Layer">
<!ENTITY decreaseZIndex.label "Send to Back">
<!ENTITY layerSendToBack.tooltip "Send to Back">
<!ENTITY increaseZIndex.label "Bring to Front">
<!ENTITY layerBringToFront.tooltip "Bring to Front">
<!ENTITY increaseIndent.label "Increase Indent">
@ -304,26 +308,44 @@
<!ENTITY linkToolbarCmd.tooltip "Insert new link or edit selected link's properties">
<!ENTITY anchorToolbarCmd.label "Anchor">
<!ENTITY anchorToolbarCmd.tooltip "Insert new named anchor or edit selected anchor's properties">
<!ENTITY colorButtons.title "Colors">
<!ENTITY TextColorButton.tooltip "Choose color for text">
<!ENTITY BackgroundColorButton.tooltip "Choose color for background">
<!ENTITY HighlightColorButton.label "Highlighter">
<!ENTITY HighlightColorButton.tooltip "Choose highlight color for text">
<!-- Editor toolbar -->
<!ENTITY absoluteFontSize.label "Font Size">
<!ENTITY absoluteFontSizeToolbarCmd.tooltip "Set font size">
<!ENTITY smaller.label "Smaller">
<!ENTITY decreaseFontSizeToolbarCmd.tooltip "Smaller font size">
<!ENTITY larger.label "Larger">
<!ENTITY increaseFontSizeToolbarCmd.tooltip "Larger font size">
<!ENTITY bold.label "Bold">
<!ENTITY boldToolbarCmd.tooltip "Bold">
<!ENTITY italic.label "Italic">
<!ENTITY italicToolbarCmd.tooltip "Italic">
<!ENTITY underline.label "Underline">
<!ENTITY underlineToolbarCmd.tooltip "Underline">
<!ENTITY bullets.label "Bullets">
<!ENTITY bulletListToolbarCmd.tooltip "Apply or remove bulleted list">
<!ENTITY numbers.label "Numbers">
<!ENTITY numberListToolbarCmd.tooltip "Apply or remove numbered list">
<!ENTITY outdent.label "Outdent">
<!ENTITY outdentToolbarCmd.tooltip "Outdent text (move left)">
<!ENTITY indent.label "Indent">
<!ENTITY indentToolbarCmd.tooltip "Indent text (move right)">
<!ENTITY AlignPopupButton.label "Alignment">
<!ENTITY AlignPopupButton.tooltip "Choose text alignment">
<!ENTITY InsertPopupButton.label "Insert">
<!ENTITY InsertPopupButton.tooltip "Insert a Link, Anchor, Image, Horizontal Line, or Table">
<!ENTITY alignLeftButton.label "Align Left">
<!ENTITY alignLeftButton.tooltip "Align text along left margin">
<!ENTITY alignCenterButton.label "Align Center">
<!ENTITY alignCenterButton.tooltip "Align text centered">
<!ENTITY alignRightButton.label "Align Right">
<!ENTITY alignRightButton.tooltip "Align text along right margin">
<!ENTITY alignJustifyButton.label "Align Justify">
<!ENTITY alignJustifyButton.tooltip "Align text along left and right margins">
<!-- Structure Toolbar Context Menu items -->

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

@ -5,9 +5,8 @@
<!--LOCALIZATION NOTE (editorCheck.label): DONT_TRANSLATE -->
<!ENTITY editorCheck.label "Composer">
<!ENTITY editorCheck.accesskey "c">
<!ENTITY editorCheck.accesskey "C">
<!ENTITY compose.label "Composer">
<!ENTITY editing.label "New Page Settings">
<!ENTITY toolbars.label "Toolbars">
<!ENTITY publish.label "Publishing">

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

@ -54,4 +54,5 @@
<!ENTITY smiley16Cmd.label "Lips-are-Sealed">
<!ENTITY smiley16Cmd.accesskey "a">
<!ENTITY smiley16Cmd.tooltip "Insert a lips-are-sealed face">
<!ENTITY SmileButton.label "Insert Smiley">
<!ENTITY SmileButton.tooltip "Insert a smiley face">

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

@ -1,21 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY pref.toolbars.title "Toolbars">
<!ENTITY formatting.caption "Show these buttons in the Formatting Toolbar:">
<!ENTITY smaller.label "Smaller">
<!ENTITY larger.label "Larger">
<!ENTITY bold.label "Bold">
<!ENTITY bullets.label "Bullets">
<!ENTITY numbers.label "Numbers">
<!ENTITY italic.label "Italic">
<!ENTITY outdent.label "Outdent">
<!ENTITY indent.label "Indent">
<!ENTITY underline.label "Underline">
<!ENTITY absolutePosition.label "Absolute positioning">
<!ENTITY decreaseZIndex.label "Send to back">
<!ENTITY increaseZIndex.label "Bring to front">

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

@ -42,7 +42,6 @@
locale/@AB_CD@/editor/editor.dtd (%chrome/composer/editor.dtd)
locale/@AB_CD@/editor/editingOverlay.dtd (%chrome/composer/editingOverlay.dtd)
locale/@AB_CD@/editor/editorPrefsOverlay.dtd (%chrome/composer/editorPrefsOverlay.dtd)
locale/@AB_CD@/editor/pref-toolbars.dtd (%chrome/composer/pref-toolbars.dtd)
locale/@AB_CD@/editor/pref-editing.dtd (%chrome/composer/pref-editing.dtd)
locale/@AB_CD@/editor/pref-composer.dtd (%chrome/composer/pref-composer.dtd)
locale/@AB_CD@/editor/EditorPageProperties.dtd (%chrome/dialogs/EditorPageProperties.dtd)

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

@ -351,7 +351,9 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint)
var externalToolbars = Array.from(toolbox.externalToolbars)
.filter(function(toolbar) {
return toolbar.hasAttribute("toolbarname")});
var toolbars = Array.from(toolbox.getElementsByAttribute("toolbarname", "*"));
var toolbars = Array.from(toolbox.getElementsByAttribute("toolbarname", "*"))
.filter(function(toolbar) {
return !toolbar.hasAttribute("hideinmenu")});
toolbars = toolbars.concat(externalToolbars);
var menusep = document.getElementById("toolbarmode-sep");

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

@ -70,6 +70,7 @@ var gMsgSubjectElement;
var gMsgAttachmentElement;
var gMsgHeadersToolbarElement;
var gComposeType;
var gFormatToolbarHidden = false;
// i18n globals
var gCharsetConvertManager;
@ -1309,11 +1310,12 @@ function ComposeStartup(aParams)
else
{
//Remove HTML toolbar, format and insert menus as we are editing in plain text mode
let toolbar = document.getElementById("FormatToolbar");
toolbar.hidden = true;
toolbar.setAttribute("hideinmenu", "true");
document.getElementById("outputFormatMenu").setAttribute("hidden", true);
document.getElementById("FormatToolbar").setAttribute("hidden", true);
document.getElementById("formatMenu").setAttribute("hidden", true);
document.getElementById("insertMenu").setAttribute("hidden", true);
document.getElementById("menu_showFormatToolbar").setAttribute("hidden", true);
}
// Do setup common to Message Composer and Web Composer
@ -1937,7 +1939,6 @@ function OutputFormatMenuSelect(target)
var toolbar = document.getElementById("FormatToolbar");
var format_menubar = document.getElementById("formatMenu");
var insert_menubar = document.getElementById("insertMenu");
var show_menuitem = document.getElementById("menu_showFormatToolbar");
if (msgCompFields)
switch (target.getAttribute('id'))
@ -1950,9 +1951,14 @@ function OutputFormatMenuSelect(target)
gHideMenus = (gSendFormat == nsIMsgCompSendFormat.PlainText);
format_menubar.hidden = gHideMenus;
insert_menubar.hidden = gHideMenus;
show_menuitem.hidden = gHideMenus;
toolbar.hidden = gHideMenus ||
(show_menuitem.getAttribute("checked") == "false");
if (gHideMenus) {
gFormatToolbarHidden = toolbar.hidden;
toolbar.hidden = true;
toolbar.setAttribute("hideinmenu", "true");
} else {
toolbar.hidden = gFormatToolbarHidden;
toolbar.removeAttribute("hideinmenu");
}
}
}

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

@ -287,11 +287,6 @@
<menupopup id="view_toolbars_popup"
onpopupshowing="onViewToolbarsPopupShowing(event)"
oncommand="onViewToolbarCommand(event);">
<menuitem id="menu_showFormatToolbar"
type="checkbox"
label="&showFormatToolbarCmd.label;"
accesskey="&showFormatToolbarCmd.accesskey;"
command="cmd_viewFormatToolbar"/>
<menuitem id="menu_showTaskbar"/>
</menupopup>
</menu>
@ -636,6 +631,15 @@
class="chromeclass-toolbar"
persist="collapsed"
grippytooltiptext="&formatToolbar.tooltip;"
toolbarname="&showFormatToolbarCmd.label;"
accesskey="&showFormatToolbarCmd.accesskey;"
customizable="true"
defaultset="paragraph-select-container,font-face-select-container,color-buttons-container,DecreaseFontSizeButton,IncreaseFontSizeButton,separator,boldButton,italicButton,underlineButton,separator,ulButton,olButton,outdentButton,indentButton,separator,AlignPopupButton,InsertPopupButton,smileButtonMenu"
mode="icons"
iconsize="small"
defaultmode="icons"
defaulticonsize="small"
context="toolbar-context-menu"
nowindowdrag="true">
<toolbaritem id="paragraph-select-container"/>
<toolbaritem id="font-face-select-container"/>
@ -643,20 +647,16 @@
disableoncustomize="true"/>
<toolbarbutton id="DecreaseFontSizeButton"/>
<toolbarbutton id="IncreaseFontSizeButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="boldButton"/>
<toolbarbutton id="italicButton"/>
<toolbarbutton id="underlineButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="ulButton"/>
<toolbarbutton id="olButton"/>
<toolbarbutton id="outdentButton"/>
<toolbarbutton id="indentButton"/>
<toolbarseparator class="toolbarseparator-standard"/>
<toolbarbutton id="AlignPopupButton"/>
<toolbarbutton id="InsertPopupButton"/>
<toolbarbutton id="smileButtonMenu"/>
<spacer flex="1"/>
</toolbar>
<toolbarpalette id="MsgComposeToolbarPalette">

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

@ -561,3 +561,14 @@ toolbarbutton.formatting-button {
#decreaseZIndexButton[disabled="true"] {
list-style-image: url("chrome://editor/content/images/sendtoback-disabled.gif");
}
/* Force the folder location and mail view items to fit in the available width
in the Customize Toolbar dialog. */
#palette-box #paragraph-select-container,
#palette-box #ParagraphSelect,
#palette-box #font-face-select-container,
#palette-box #FontFaceSelect,
#palette-box #font-size-select-container,
#palette-box #FontSizeSelect {
-moz-box-flex: 1;
}

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

@ -14,6 +14,7 @@ classic.jar:
% style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/smime/msgCompSMIMEOverlay.css
% style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/addressbook/addressbook.css
% style chrome://communicator/content/customizeToolbar.xul chrome://editor/skin/editorPrimaryToolbar.css
% style chrome://communicator/content/customizeToolbar.xul chrome://editor/skin/editorFormatToolbar.css
#ifdef XP_MACOSX
skin/classic/communicator/aboutPrivateBrowsing.css (mac/communicator/aboutPrivateBrowsing.css)
skin/classic/communicator/aboutSessionRestore.css (mac/communicator/aboutSessionRestore.css)

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

@ -525,3 +525,14 @@ toolbarbutton.formatting-button {
#decreaseZIndexButton[disabled="true"] {
list-style-image: url("chrome://editor/content/images/sendtoback-disabled.gif");
}
/* Force the folder location and mail view items to fit in the available width
in the Customize Toolbar dialog. */
#palette-box #paragraph-select-container,
#palette-box #ParagraphSelect,
#palette-box #font-face-select-container,
#palette-box #FontFaceSelect,
#palette-box #font-size-select-container,
#palette-box #FontSizeSelect {
-moz-box-flex: 1;
}

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

@ -578,3 +578,14 @@ toolbarbutton.formatting-button {
#decreaseZIndexButton[disabled="true"] {
list-style-image: url("chrome://editor/content/images/sendtoback-disabled.gif");
}
/* Force the folder location and mail view items to fit in the available width
in the Customize Toolbar dialog. */
#palette-box #paragraph-select-container,
#palette-box #ParagraphSelect,
#palette-box #font-face-select-container,
#palette-box #FontFaceSelect,
#palette-box #font-size-select-container,
#palette-box #FontSizeSelect {
-moz-box-flex: 1;
}

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

@ -20,6 +20,7 @@ modern.jar:
% style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/smime/msgCompSMIMEOverlay.css
% style chrome://communicator/content/customizeToolbar.xul chrome://messenger/skin/addressbook/addressbook.css
% style chrome://communicator/content/customizeToolbar.xul chrome://editor/skin/editorPrimaryToolbar.css
% style chrome://communicator/content/customizeToolbar.xul chrome://editor/skin/editorFormatToolbar.css
skin/modern/communicator/brand.css (communicator/brand.css)
skin/modern/communicator/blockedSite.css (communicator/blockedSite.css)
skin/modern/communicator/certError.css (communicator/certError.css)