Bug 431061 - Migrate main Composer prefs and toolbars prefs to new pref pane (SeaMonkey-only). r+sr=Neil.

This commit is contained in:
stefanh@inbox.com 2008-05-04 11:37:51 -07:00
Родитель f777399574
Коммит 7520682876
6 изменённых файлов: 290 добавлений и 241 удалений

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

@ -97,13 +97,6 @@ pref("editor.toolbars.showbutton.absolutePosition", true);
pref("editor.toolbars.showbutton.decreaseZIndex", true);
pref("editor.toolbars.showbutton.increaseZIndex", true);
pref("editor.auto_save", false);
pref("editor.auto_save_delay", 10); // minutes
pref("editor.use_html_editor", 0);
pref("editor.html_editor", "");
pref("editor.use_image_editor", 0);
pref("editor.image_editor", "");
pref("editor.history.url_maximum", 10);
pref("editor.publish.", "");

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

@ -3861,7 +3861,7 @@ var nsPreferencesCommand =
doCommand: function(aCommand)
{
goPreferences('editor', 'chrome://editor/content/pref-composer.xul','editor');
goPreferences('composer_pane');
window.content.focus();
}
};

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

@ -24,13 +24,33 @@
accesskey="&editorCheck.accesskey;"
preference="general.startup.editor"/>
</groupbox>
<!-- category tree entries for editor -->
<treechildren id="prefsPanelChildren">
<treeitem container="true"
id="composerItem"
insertafter="mailnews,navigator"
label="&compose.label;"
prefpane="composer_pane"
url="chrome://editor/content/pref-composer.xul"
helpTopic="composer_prefs_general">
<treechildren id="composerChildren">
<!-- XXX Move pref panes from below to here as they are migrated -->
<treeitem id="toolbarsItem"
label="&toolbars.label;"
prefpane="toolbars_pane"
url="chrome://editor/content/pref-toolbars.xul"
helpTopic="composer_prefs_toolbars"/>
</treechildren>
</treeitem>
</treechildren>
<!-- category tree entries for editor -->
<treechildren id="panelChildren">
<treeitem container="true" id="editor" insertafter="mailnews,navigator">
<treerow>
<treecell url="chrome://editor/content/pref-composer.xul" label="&compose.label;" />
<treecell label="Migrated: &compose.label;"/>
</treerow>
<!-- XXX Move these up as we migrate the panels -->
<treechildren>
<treeitem>
<treerow>
@ -46,7 +66,7 @@
-->
<treeitem>
<treerow>
<treecell url="chrome://editor/content/pref-toolbars.xul" label="&toolbars.label;"/>
<treecell label="Migrated: &toolbars.label;"/>
</treerow>
</treeitem>
</treechildren>

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

@ -40,154 +40,87 @@
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<!DOCTYPE page SYSTEM "chrome://editor/locale/pref-composer.dtd" >
<!DOCTYPE overlay SYSTEM "chrome://editor/locale/pref-composer.dtd">
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://editor/content/pref-composer.xul');"
headertitle="&pref.composer.title;">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<prefpane id="composer_pane"
label="&pref.composer.title;"
script="chrome://editor/content/EdDialogCommon.js chrome://editor/content/editorUtilities.js">
<script type="application/x-javascript">
<!-- Add "shouldAutoSave", "autoSaveAmount" to _elementIDs when implemented -->
<![CDATA[
var _elementIDs = ["maintainTableStructure", "preserveFormatting", "saveAssociatedFiles", "showPublishDialog", "recentFiles", "useCSS", "crInPCreatesNewP"];
]]>
</script>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<!-- Recent files menu -->
<groupbox>
<caption label="&recentFiles.title;"/>
<hbox align="center">
<label value = "&documentsInMenu.label;"
accesskey = "&documentsInMenu.accesskey;"
control = "recentFiles"/>
<textbox
id="recentFiles"
name="recent string"
size="3"
value="10"
preftype="int"
prefstring="editor.history.url_maximum"
oninput=" ValidateNumber(this, null, 0, 99); LimitStringLength('recentFiles',2);"
/>
</hbox>
</groupbox>
<preferences id="composer_preferences">
<preference id="editor.history.url_maximum"
name="editor.history.url_maximum"
type="int"/>
<preference id="editor.prettyprint"
name="editor.prettyprint"
type="bool"
inverted="true"/>
<preference id="editor.save_associated_files"
name="editor.save_associated_files"
type="bool"/>
<preference id="editor.always_show_publish_dialog"
name="editor.always_show_publish_dialog"
type="bool"/>
<preference id="editor.table.maintain_structure"
name="editor.table.maintain_structure"
type="bool"/>
<preference id="editor.use_css"
name="editor.use_css"
type="bool"/>
<preference id="editor.CR_creates_new_p"
name="editor.CR_creates_new_p"
type="bool"/>
</preferences>
<!-- HTML formatting on output -->
<groupbox>
<caption label="&savingFiles.title;"/>
<spacer class="spacer"/>
<checkbox
label = "&preserveExisting.label;"
id = "preserveFormatting"
accesskey = "&preserveExisting.accesskey;"
tooltiptext = "&preserveExisting.tooltip;"
preftype = "bool"
prefstring = "editor.prettyprint"
reversed = "true"
/>
<checkbox
label = "&saveAssociatedFiles.label;"
id = "saveAssociatedFiles"
accesskey = "&saveAssociatedFiles.accesskey;"
preftype = "bool"
prefindex = "0"
prefstring = "editor.save_associated_files"
/>
<checkbox
label = "&showPublishDialog.label;"
id = "showPublishDialog"
accesskey = "&showPublishDialog.accesskey;"
preftype = "bool"
prefindex = "0"
prefstring = "editor.always_show_publish_dialog"
/>
</groupbox>
<groupbox align="start">
<caption label = "&composerEditing.label;"/>
<checkbox
label = "&maintainStructure.label;"
id = "maintainTableStructure"
accesskey = "&maintainStructure.accesskey;"
tooltiptext = "&maintainStructure.tooltip;"
prefstring = "editor.table.maintain_structure"
/>
<checkbox
label = "&useCSS.label;"
id = "useCSS"
accesskey = "&useCSS.accesskey;"
prefstring = "editor.use_css"
/>
<checkbox
label = "&crInPCreatesNewP.label;"
id = "crInPCreatesNewP"
accesskey = "&crInPCreatesNewP.accesskey;"
prefstring = "editor.CR_creates_new_p"
/>
</groupbox>
<!-- Take out Auto-Save; not supported at this time
<groupbox>
<caption label="&saving;"/>
<hbox align="center">
<checkbox
label = "&AutoSaveCheck;"
id = "shouldAutoSave"
prefstring = "editor.auto_save"
name = "autosave"
/>
<textbox
id="autoSaveAmount"
name="time"
size="3"
value="5"
preftype="int"
prefstring="editor.auto_save_delay"
/>
<label value="&minText;" />
</hbox>
</groupbox>
-->
<!-- External Editors are not supported at this time
<!-- Recent files menu -->
<groupbox>
<caption label="&exterLegend.label;"/>
<hbox>
<checkbox
name = "htmlSourceEditorCheckbox"
label = "&htmlSource;"
preftype = "int"
prefindex = "0"
prefstring = "editor.use_html_editor"
/>
<textbox
name = "&chooseButton.label;"
preftype = "string"
/>
<button
name = ""
label = "&chooseButton.label;"
/>
</hbox>
<caption label="&recentFiles.title;"/>
<hbox align="center">
<label value="&documentsInMenu.label;"
accesskey="&documentsInMenu.accesskey;"
control="recentFiles"/>
<textbox id="recentFiles"
name="recent string"
size="3"
value="10"
preference="editor.history.url_maximum"
oninput=" ValidateNumber(this, null, 0, 99); LimitStringLength('recentFiles',2);"/>
</hbox>
</groupbox>
<hbox>
<checkbox
name = "htmlImageEditorCheckbox"
label = "&imageeditor;"
preftype = "int"
prefindex = "0"
prefstring ="editor.use_image_editor"
/>
<!-- HTML formatting on output -->
<groupbox>
<caption label="&savingFiles.title;"/>
<checkbox id="preserveFormatting"
label="&preserveExisting.label;"
accesskey="&preserveExisting.accesskey;"
tooltiptext="&preserveExisting.tooltip;"
preference="editor.prettyprint"/>
<checkbox id="saveAssociatedFiles"
label="&saveAssociatedFiles.label;"
accesskey="&saveAssociatedFiles.accesskey;"
preference="editor.save_associated_files"/>
<checkbox id="showPublishDialog"
label="&showPublishDialog.label;"
accesskey="&showPublishDialog.accesskey;"
preference="editor.always_show_publish_dialog"/>
</groupbox>
<textbox
name="chooseButton.label"
prefstring = "editor.image_editor"
/>
<button label="&chooseButton.label;" />
</hbox>
</groupbox>
-->
</page>
<groupbox align="start">
<caption label="&composerEditing.label;"/>
<checkbox id="maintainTableStructure"
label="&maintainStructure.label;"
accesskey="&maintainStructure.accesskey;"
tooltiptext="&maintainStructure.tooltip;"
preference="editor.table.maintain_structure"/>
<checkbox id="useCSS"
label="&useCSS.label;"
accesskey="&useCSS.accesskey;"
preference="editor.use_css"/>
<checkbox id="crInPCreatesNewP"
label="&crInPCreatesNewP.label;"
accesskey="&crInPCreatesNewP.accesskey;"
preference="editor.CR_creates_new_p"/>
</groupbox>
</prefpane>
</overlay>

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

@ -37,93 +37,195 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE page SYSTEM "chrome://editor/locale/pref-toolbars.dtd">
<!DOCTYPE overlay SYSTEM "chrome://editor/locale/pref-toolbars.dtd">
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://editor/content/pref-toolbars.xul');"
headertitle="&pref.toolbars.title;">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<prefpane id="toolbars_pane"
label="&pref.toolbars.title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = [
"showNew", "showOpen", "showSave", "showPublish", "showPreview", "showSmaller", "showLarger", "showBold",
"showCut", "showCopy", "showPaste", "showPrint", "showFind", "showBullets", "showNumbers", "showItalic",
"showImage", "showHline", "showTable", "showLink", "showAnchor", "showOutdent", "showIndent", "showUnderline",
"showAbsolutePosition", "showDecreaseZIndex", "showIncreaseZIndex" ];
]]>
</script>
<preferences id="toolbars_preferences">
<preference id="editor.toolbars.showbutton.new"
name="editor.toolbars.showbutton.new"
type="bool"/>
<preference id="editor.toolbars.showbutton.open"
name="editor.toolbars.showbutton.open"
type="bool"/>
<preference id="editor.toolbars.showbutton.save"
name="editor.toolbars.showbutton.save"
type="bool"/>
<preference id="editor.toolbars.showbutton.publish"
name="editor.toolbars.showbutton.publish"
type="bool"/>
<preference id="editor.toolbars.showbutton.preview"
name="editor.toolbars.showbutton.preview"
type="bool"/>
<preference id="editor.toolbars.showbutton.cut"
name="editor.toolbars.showbutton.cut"
type="bool"/>
<preference id="editor.toolbars.showbutton.copy"
name="editor.toolbars.showbutton.copy"
type="bool"/>
<preference id="editor.toolbars.showbutton.paste"
name="editor.toolbars.showbutton.paste"
type="bool"/>
<preference id="editor.toolbars.showbutton.print"
name="editor.toolbars.showbutton.print"
type="bool"/>
<preference id="editor.toolbars.showbutton.find"
name="editor.toolbars.showbutton.find"
type="bool"/>
<preference id="editor.toolbars.showbutton.image"
name="editor.toolbars.showbutton.image"
type="bool"/>
<preference id="editor.toolbars.showbutton.hline"
name="editor.toolbars.showbutton.hline"
type="bool"/>
<preference id="editor.toolbars.showbutton.table"
name="editor.toolbars.showbutton.table"
type="bool"/>
<preference id="editor.toolbars.showbutton.link"
name="editor.toolbars.showbutton.link"
type="bool"/>
<preference id="editor.toolbars.showbutton.namedAnchor"
name="editor.toolbars.showbutton.namedAnchor"
type="bool"/>
<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">
<caption label="&composition.caption;"/>
<vbox flex="1">
<checkbox label="&new.label;" id="showNew"
prefstring="editor.toolbars.showbutton.new"/>
<checkbox label="&open.label;" id="showOpen"
prefstring="editor.toolbars.showbutton.open"/>
<checkbox label="&save.label;" id="showSave"
prefstring="editor.toolbars.showbutton.save"/>
<checkbox label="&publish.label;" id="showPublish"
prefstring="editor.toolbars.showbutton.publish"/>
<checkbox label="&preview.label;" id="showPreview"
prefstring="editor.toolbars.showbutton.preview"/>
</vbox>
<vbox flex="1">
<checkbox label="&cut.label;" id="showCut"
prefstring="editor.toolbars.showbutton.cut"/>
<checkbox label="&copy.label;" id="showCopy"
prefstring="editor.toolbars.showbutton.copy"/>
<checkbox label="&paste.label;" id="showPaste"
prefstring="editor.toolbars.showbutton.paste"/>
<checkbox label="&print.label;" id="showPrint"
prefstring="editor.toolbars.showbutton.print"/>
<checkbox label="&find.label;" id="showFind"
prefstring="editor.toolbars.showbutton.find"/>
</vbox>
<vbox flex="1">
<checkbox label="&image.label;" id="showImage"
prefstring="editor.toolbars.showbutton.image"/>
<checkbox label="&hline.label;" id="showHline"
prefstring="editor.toolbars.showbutton.hline"/>
<checkbox label="&table.label;" id="showTable"
prefstring="editor.toolbars.showbutton.table"/>
<checkbox label="&link.label;" id="showLink"
prefstring="editor.toolbars.showbutton.link"/>
<checkbox label="&anchor.label;" id="showAnchor"
prefstring="editor.toolbars.showbutton.namedAnchor"/>
</vbox>
</groupbox>
<groupbox orient="horizontal">
<caption label="&composition.caption;"/>
<vbox flex="1">
<checkbox id="showNew"
label="&new.label;"
preference="editor.toolbars.showbutton.new"/>
<checkbox id="showOpen"
label="&open.label;"
preference="editor.toolbars.showbutton.open"/>
<checkbox id="showSave"
label="&save.label;"
preference="editor.toolbars.showbutton.save"/>
<checkbox id="showPublish"
label="&publish.label;"
preference="editor.toolbars.showbutton.publish"/>
<checkbox id="showPreview"
label="&preview.label;"
preference="editor.toolbars.showbutton.preview"/>
</vbox>
<vbox flex="1">
<checkbox id="showCut"
label="&cut.label;"
preference="editor.toolbars.showbutton.cut"/>
<checkbox id="showCopy"
label="&copy.label;"
preference="editor.toolbars.showbutton.copy"/>
<checkbox id="showPaste"
label="&paste.label;"
preference="editor.toolbars.showbutton.paste"/>
<checkbox id="showPrint"
label="&print.label;"
preference="editor.toolbars.showbutton.print"/>
<checkbox id="showFind"
label="&find.label;"
preference="editor.toolbars.showbutton.find"/>
</vbox>
<vbox flex="1">
<checkbox id="showImage"
label="&image.label;"
preference="editor.toolbars.showbutton.image"/>
<checkbox id="showHline"
label="&hline.label;"
preference="editor.toolbars.showbutton.hline"/>
<checkbox id="showTable"
label="&table.label;"
preference="editor.toolbars.showbutton.table"/>
<checkbox id="showLink"
label="&link.label;"
preference="editor.toolbars.showbutton.link"/>
<checkbox id="showAnchor"
label="&anchor.label;"
preference="editor.toolbars.showbutton.namedAnchor"/>
</vbox>
</groupbox>
<groupbox orient="horizontal">
<caption label="&formatting.caption;"/>
<vbox flex="1">
<checkbox label="&smaller.label;" id="showSmaller"
prefstring="editor.toolbars.showbutton.DecreaseFontSize"/>
<checkbox label="&larger.label;" id="showLarger"
prefstring="editor.toolbars.showbutton.IncreaseFontSize"/>
<checkbox label="&bold.label;" id="showBold"
prefstring="editor.toolbars.showbutton.bold"/>
<checkbox label="&absolutePosition.label;" id="showAbsolutePosition"
prefstring="editor.toolbars.showbutton.absolutePosition"/>
</vbox>
<vbox flex="1">
<checkbox label="&bullets.label;" id="showBullets"
prefstring="editor.toolbars.showbutton.ul"/>
<checkbox label="&numbers.label;" id="showNumbers"
prefstring="editor.toolbars.showbutton.ol"/>
<checkbox label="&italic.label;" id="showItalic"
prefstring="editor.toolbars.showbutton.italic"/>
<checkbox label="&decreaseZIndex.label;" id="showDecreaseZIndex"
prefstring="editor.toolbars.showbutton.decreaseZIndex"/>
</vbox>
<vbox flex="1">
<checkbox label="&outdent.label;" id="showOutdent"
prefstring="editor.toolbars.showbutton.outdent"/>
<checkbox label="&indent.label;" id="showIndent"
prefstring="editor.toolbars.showbutton.indent"/>
<checkbox label="&underline.label;" id="showUnderline"
prefstring="editor.toolbars.showbutton.underline"/>
<checkbox label="&increaseZIndex.label;" id="showIncreaseZIndex"
prefstring="editor.toolbars.showbutton.increaseZIndex"/>
</vbox>
</groupbox>
</page>
<groupbox orient="horizontal">
<caption label="&formatting.caption;"/>
<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>

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

@ -4,6 +4,7 @@ comm.jar:
% overlay chrome://messenger/content/mailWindowOverlay.xul chrome://editor/content/editorMailOverlay.xul
#ifdef MOZ_SUITE
% overlay chrome://communicator/content/pref/preftree.xul chrome://editor/content/editorPrefsOverlay.xul
% overlay chrome://communicator/content/pref/preferences.xul chrome://editor/content/editorPrefsOverlay.xul
% overlay chrome://communicator/content/pref/pref-appearance.xul chrome://editor/content/editorPrefsOverlay.xul
% overlay chrome://navigator/content/navigatorOverlay.xul chrome://editor/content/editorNavigatorOverlay.xul
% content editor-region %content/editor-region/ xpcnativewrappers=yes