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.decreaseZIndex", true);
pref("editor.toolbars.showbutton.increaseZIndex", 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.history.url_maximum", 10);
pref("editor.publish.", ""); pref("editor.publish.", "");

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

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

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

@ -24,13 +24,33 @@
accesskey="&editorCheck.accesskey;" accesskey="&editorCheck.accesskey;"
preference="general.startup.editor"/> preference="general.startup.editor"/>
</groupbox> </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 --> <!-- category tree entries for editor -->
<treechildren id="panelChildren"> <treechildren id="panelChildren">
<treeitem container="true" id="editor" insertafter="mailnews,navigator"> <treeitem container="true" id="editor" insertafter="mailnews,navigator">
<treerow> <treerow>
<treecell url="chrome://editor/content/pref-composer.xul" label="&compose.label;" /> <treecell label="Migrated: &compose.label;"/>
</treerow> </treerow>
<!-- XXX Move these up as we migrate the panels -->
<treechildren> <treechildren>
<treeitem> <treeitem>
<treerow> <treerow>
@ -46,7 +66,7 @@
--> -->
<treeitem> <treeitem>
<treerow> <treerow>
<treecell url="chrome://editor/content/pref-toolbars.xul" label="&toolbars.label;"/> <treecell label="Migrated: &toolbars.label;"/>
</treerow> </treerow>
</treeitem> </treeitem>
</treechildren> </treechildren>

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

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

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

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

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

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