Fix for 11770 -- implement show/hide toolbars in editor. r=akkana

This commit is contained in:
sfraser%netscape.com 2000-03-17 03:03:13 +00:00
Родитель 8277d298ea
Коммит 2c7563626f
4 изменённых файлов: 41 добавлений и 31 удалений

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

@ -31,41 +31,51 @@
<!-- NOTE: If we don't have "title" set, text editor doesn't work! -->
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="TextEditorOnLoad()"
onunload="EditorShutdown()"
title="&textEditorWindow.titlemodifier;"
titlemodifier="&textEditorWindow.titlemodifier;"
onunload="EditorShutdown()"
titlemodifier="&textEditorWindow.titlemodifier;"
titlemenuseparator="&editorWindow.titlemodifiermenuseparator;"
windowtype="composer:text"
align="vertical"
width="640" height="480">
width="640" height="480"
screenX="10" screenY="10"
persist="screenX screenY width height"
>
<html:script language="JavaScript" src="chrome://editor/content/EditorCommands.js"/>
<html:script language="JavaScript" src="chrome://editor/content/EditorCommandsDebug.js"/>
<commands id="commands">
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
</commands>
<broadcaster id="args" value="chrome://editor/content/EditorInitPagePlain.html"/>
<broadcaster id="canPrint"/>
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('text', document.getElementById('content-frame'))"/>
<observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('text')"/>
<!-- broadcaster nodes are appended here from the overlays -->
<broadcasterset id="broadcasterset">
<broadcaster id="Editor:Throbber" busy="false"/>
</broadcasterset>
<!-- keys are appended from the overlay -->
<keyset id="defaultKeySet"/>
<menubar>
<menubar id="main-menubar" chromeclass="menubar">
<menu id="fileMenu"/>
<menu id="editMenu"/>
<menu value="&viewMenu.label;" accesskey="&viewmenu.accesskey;">
<menupopup>
<menuitem id="compToolbarMenuitem"/>
<menuitem id="formatToolbarMenuitem"/>
<menuseparator />
<!-- id pulls in "Show Sidebar" item from sidebarOverlay -->
<menupopup id="menu_View_Popup">
<menu id="viewToolbar"/>
<menuseparator/>
<menuitem id="viewSourceMenuitem"/>
<menuseparator />
<menu id="charsetMenu"/>
@ -92,9 +102,9 @@
<spring flex="100%"/>
</menubar>
<toolbox>
<toolbox id="EditorToolbox">
<!-- toolbar filled out from editorOverlay -->
<toolbar id="EditToolbar" class="standard" persist="collapsed">
<toolbar id="EditToolbar" chromeclass="toolbar" class="standard" persist="collapsed">
<titledbutton id="newButton"/>
<titledbutton id="openButton"/>
<titledbutton id="saveButton"/>
@ -110,6 +120,6 @@
<editor type="content-primary" id="content-frame" src="about:blank" flex="100%"/>
<!-- status bar, from editorOverlay.xul -->
<box id="status-bar" />
<toolbar id="taskbar" chromeclass="extrachrome" />
</window>

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

@ -129,7 +129,7 @@
<toolbox id="EditorToolbox">
<!-- toolbar filled out from editorOverlay -->
<!-- add class="standard" for dark blue background (icons need rework first) -->
<toolbar id="EditToolbar" class="standard" persist="collapsed">
<toolbar id="EditToolbar" chromeclass="toolbar" class="standard" persist="collapsed">
<titledbutton id="newButton"/>
<titledbutton id="openButton"/>
<titledbutton id="saveButton"/>
@ -151,7 +151,7 @@
</titledbutton>
</box>
</toolbar>
<toolbar id="FormatToolbar" persist="collapsed">
<toolbar id="FormatToolbar" chromeclass="toolbar" persist="collapsed">
<html:div>
<!-- items are filled out from editorOverlay -->
<html:select id="ParagraphSelect"/>

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

@ -181,9 +181,10 @@
<broadcaster id="Editor:Exit" value="&exitCmd.label;" oncommand="EditorExit()"/>
<!-- need to toggle the menu item text through style -->
<broadcaster id="Editor:ToggleCompositionToolbar" value="&hideCompositionToolbarCmd.label;" showing="true" oncommand="_EditorNotImplemented()" disabled="true"/>
<broadcaster id="Editor:ToggleFormattingToolbar" value="&hideFormattingToolbarCmd.label;" showing="true" oncommand="_EditorNotImplemented()" disabled="true"/>
<broadcaster id="cmd_viewCompToolbar" oncommand="goToggleToolbar('EditToolbar','cmd_viewCompToolbar');" checked="true"/>
<broadcaster id="cmd_viewFormatToolbar" oncommand="goToggleToolbar('FormatToolbar','cmd_viewFormatToolbar');" checked="true"/>
<broadcaster id="cmd_viewtaskbar" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<broadcaster id="Editor:InsertLink" value="&insertLinkCmd.label;" oncommand="EditorInsertOrEditLink()"/>
<broadcaster id="Editor:InsertAnchor" value="&insertAnchorCmd.label;" oncommand="EditorInsertOrEditNamedAnchor()"/>
<broadcaster id="Editor:InsertImage" value="&insertImageCmd.label;" oncommand="EditorInsertOrEditImage()"/>
@ -257,9 +258,11 @@
<!-- view menu items -->
<menu id="viewToolbar" value="&viewToolbarsMenu.label;" accesskey="&viewToolbarsMenu.accesskey;">
<menupopup>
<menuitem id="compToolbarMenuitem" accesskey="&viewcompositiontb.accesskey;" observes="Editor:ToggleCompositionToolbar"/>
<menuitem id="formatToolbarMenuitem" accesskey="&viewformattingtb.accesskey;" observes="Editor:ToggleFormattingToolbar"/>
<menuitem id="editorTaskBar" value="&showTaskbarCmd.label;" accesskey="&showTaskbarCmd.accesskey;" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<menuitem value="&compositionToolbarCmd.label;" accesskey="&compositiontb.accesskey;" observes="cmd_viewCompToolbar" />
<menuitem value="&formattingToolbarCmd.label;" accesskey="&formattingtb.accesskey;" observes="cmd_viewFormatToolbar" />
<menuitem value="&taskbarCmd.label;" accesskey="&taskbarCmd.accesskey;" observes="cmd_viewtaskbar" />
</menupopup>
</menu>
<menuitem id="viewSourceMenuitem" value="&viewPageSource.label;" accesskey="&viewpagesource.accesskey;" oncommand="EditorViewSource();"/>

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

@ -96,18 +96,15 @@
<!ENTITY viewMenu.label "View">
<!ENTITY viewToolbarsMenu.label "Toolbars">
<!ENTITY viewToolbarsMenu.accesskey "t">
<!ENTITY hideCompositionToolbarCmd.label "Hide Composition Toolbar">
<!ENTITY viewcompositiontb.accesskey "c">
<!ENTITY showCompositionToolbarCmd.label "Show Composition Toolbar">
<!ENTITY hideFormattingToolbarCmd.label "Hide Format Toolbar">
<!ENTITY viewformattingtb.accesskey "f">
<!ENTITY showFormattingToolbarCmd.label "Show Format Toolbar">
<!ENTITY showTaskbarCmd.label "Show Taskbar">
<!ENTITY showTaskbarCmd.accesskey "t">
<!ENTITY compositionToolbarCmd.label "Composition Toolbar">
<!ENTITY compositiontb.accesskey "c">
<!ENTITY formattingToolbarCmd.label "Format Toolbar">
<!ENTITY formattingtb.accesskey "f">
<!ENTITY taskbarCmd.label "Taskbar">
<!ENTITY taskbarCmd.accesskey "t">
<!ENTITY viewPageSource.label "Page Source">
<!ENTITY viewpagesource.accesskey "s">
<!-- Charset menu items -->
<!ENTITY dcharMenu.label "Character Set ISO">
<!ENTITY viewcharsetmenu.accesskey "">