toolkit/components/viewsource/content/viewSource.xul

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <?xml version="1.0"?>
michael@0 2 # -*- Mode: HTML -*-
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
michael@0 8 <?xml-stylesheet href="chrome://global/content/viewSource.css" type="text/css"?>
michael@0 9 <?xml-stylesheet href="chrome://mozapps/skin/viewsource/viewsource.css" type="text/css"?>
michael@0 10 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
michael@0 11
michael@0 12 <!DOCTYPE window [
michael@0 13 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
michael@0 14 %brandDTD;
michael@0 15 <!ENTITY % sourceDTD SYSTEM "chrome://global/locale/viewSource.dtd" >
michael@0 16 %sourceDTD;
michael@0 17 <!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" >
michael@0 18 %charsetDTD;
michael@0 19 ]>
michael@0 20
michael@0 21 <window id="viewSource"
michael@0 22 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 23 onload="onLoadViewSource();"
michael@0 24 contenttitlesetting="true"
michael@0 25 title="&mainWindow.title;"
michael@0 26 titlemodifier="&mainWindow.titlemodifier;"
michael@0 27 titlepreface="&mainWindow.preface;"
michael@0 28 titlemenuseparator ="&mainWindow.titlemodifierseparator;"
michael@0 29 windowtype="navigator:view-source"
michael@0 30 width="640" height="480"
michael@0 31 screenX="10" screenY="10"
michael@0 32 persist="screenX screenY width height sizemode">
michael@0 33
michael@0 34 <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
michael@0 35 <script type="application/javascript" src="chrome://global/content/printUtils.js"/>
michael@0 36 <script type="application/javascript" src="chrome://global/content/viewSource.js"/>
michael@0 37 <script type="application/javascript" src="chrome://global/content/viewZoomOverlay.js"/>
michael@0 38 <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
michael@0 39
michael@0 40 <stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/>
michael@0 41
michael@0 42 <command id="cmd_savePage" oncommand="ViewSourceSavePage();"/>
michael@0 43 <command id="cmd_print" oncommand="PrintUtils.print();"/>
michael@0 44 <command id="cmd_printpreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
michael@0 45 <command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/>
michael@0 46 <command id="cmd_close" oncommand="window.close();"/>
michael@0 47 <commandset id="editMenuCommands"/>
michael@0 48 <command id="cmd_find"
michael@0 49 oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
michael@0 50 <command id="cmd_findAgain"
michael@0 51 oncommand="document.getElementById('FindToolbar').onFindAgainCommand(false);"/>
michael@0 52 <command id="cmd_findPrevious"
michael@0 53 oncommand="document.getElementById('FindToolbar').onFindAgainCommand(true);"/>
michael@0 54 #ifdef XP_MACOSX
michael@0 55 <command id="cmd_findSelection"
michael@0 56 oncommand="document.getElementById('FindToolbar').onFindSelectionCommand();"/>
michael@0 57 #endif
michael@0 58 <command id="cmd_reload" oncommand="ViewSourceReload();"/>
michael@0 59 <command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/>
michael@0 60 <command id="cmd_highlightSyntax" oncommand="highlightSyntax();"/>
michael@0 61 <command id="cmd_wrapLongLines" oncommand="wrapLongLines()"/>
michael@0 62 <command id="cmd_textZoomReduce" oncommand="ZoomManager.reduce();"/>
michael@0 63 <command id="cmd_textZoomEnlarge" oncommand="ZoomManager.enlarge();"/>
michael@0 64 <command id="cmd_textZoomReset" oncommand="ZoomManager.reset();"/>
michael@0 65
michael@0 66 <command id="Browser:Back" oncommand="BrowserBack();" observes="viewSourceNavigation"/>
michael@0 67 <command id="Browser:Forward" oncommand="BrowserForward();" observes="viewSourceNavigation"/>
michael@0 68
michael@0 69 <broadcaster id="viewSourceNavigation"/>
michael@0 70
michael@0 71 <keyset id="editMenuKeys"/>
michael@0 72 <keyset id="viewSourceKeys">
michael@0 73 <key id="key_savePage" key="&savePageCmd.commandkey;" modifiers="accel" command="cmd_savePage"/>
michael@0 74 <key id="key_print" key="&printCmd.commandkey;" modifiers="accel" command="cmd_print"/>
michael@0 75 <key id="key_close" key="&closeCmd.commandkey;" modifiers="accel" command="cmd_close"/>
michael@0 76 <key id="key_goToLine" key="&goToLineCmd.commandkey;" command="cmd_goToLine" modifiers="accel"/>
michael@0 77
michael@0 78 <key id="key_textZoomEnlarge" key="&textEnlarge.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/>
michael@0 79 <key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
michael@0 80 <key id="key_textZoomEnlarge3" key="&textEnlarge.commandkey3;" command="cmd_textZoomEnlarge" modifiers="accel"/>
michael@0 81 <key id="key_textZoomReduce" key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
michael@0 82 <key id="key_textZoomReduce2" key="&textReduce.commandkey2;" command="cmd_textZoomReduce" modifiers="accel"/>
michael@0 83 <key id="key_textZoomReset" key="&textReset.commandkey;" command="cmd_textZoomReset" modifiers="accel"/>
michael@0 84 <key id="key_textZoomReset2" key="&textReset.commandkey2;" command="cmd_textZoomReset" modifiers="accel"/>
michael@0 85
michael@0 86 <key id="key_reload" key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel"/>
michael@0 87 <key key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel,shift"/>
michael@0 88 <key keycode="VK_F5" command="cmd_reload"/>
michael@0 89 <key keycode="VK_F5" command="cmd_reload" modifiers="accel"/>
michael@0 90 <key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
michael@0 91 <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
michael@0 92 <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
michael@0 93 #ifdef XP_MACOSX
michael@0 94 <key id="key_findSelection" key="&findSelectionCmd.commandkey;" command="cmd_findSelection" modifiers="accel"/>
michael@0 95 #endif
michael@0 96 <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
michael@0 97 <key keycode="&findAgainCmd.commandkey2;" command="cmd_findPrevious" modifiers="shift"/>
michael@0 98
michael@0 99 <key keycode="VK_BACK" command="Browser:Back"/>
michael@0 100 <key keycode="VK_BACK" command="Browser:Forward" modifiers="shift"/>
michael@0 101 #ifndef XP_MACOSX
michael@0 102 <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
michael@0 103 <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
michael@0 104 #else
michael@0 105 <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="accel" />
michael@0 106 <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="accel" />
michael@0 107 #endif
michael@0 108 #ifdef XP_UNIX
michael@0 109 <key id="goBackKb2" key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/>
michael@0 110 <key id="goForwardKb2" key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/>
michael@0 111 #endif
michael@0 112
michael@0 113 </keyset>
michael@0 114
michael@0 115 <tooltip id="aHTMLTooltip" page="true"/>
michael@0 116
michael@0 117 <menupopup id="viewSourceContextMenu"
michael@0 118 onpopupshowing="contextMenuShowing();">
michael@0 119 <menuitem id="context-back"
michael@0 120 label="&backCmd.label;"
michael@0 121 accesskey="&backCmd.accesskey;"
michael@0 122 command="Browser:Back"
michael@0 123 observes="viewSourceNavigation"/>
michael@0 124 <menuitem id="context-forward"
michael@0 125 label="&forwardCmd.label;"
michael@0 126 accesskey="&forwardCmd.accesskey;"
michael@0 127 command="Browser:Forward"
michael@0 128 observes="viewSourceNavigation"/>
michael@0 129 <menuseparator observes="viewSourceNavigation"/>
michael@0 130 <menuitem id="cMenu_findAgain"/>
michael@0 131 <menuseparator/>
michael@0 132 <menuitem id="cMenu_copy"/>
michael@0 133 <menuitem id="context-copyLink"
michael@0 134 label="&copyLinkCmd.label;"
michael@0 135 accesskey="&copyLinkCmd.accesskey;"
michael@0 136 oncommand="contextMenuCopyLinkOrEmail();"/>
michael@0 137 <menuitem id="context-copyEmail"
michael@0 138 label="&copyEmailCmd.label;"
michael@0 139 accesskey="&copyEmailCmd.accesskey;"
michael@0 140 oncommand="contextMenuCopyLinkOrEmail();"/>
michael@0 141 <menuseparator/>
michael@0 142 <menuitem id="cMenu_selectAll"/>
michael@0 143 </menupopup>
michael@0 144
michael@0 145 <!-- Menu -->
michael@0 146 <toolbox id="viewSource-toolbox">
michael@0 147 <menubar id="viewSource-main-menubar">
michael@0 148
michael@0 149 <menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
michael@0 150 <menupopup id="menu_FilePopup">
michael@0 151 <menuitem key="key_savePage" command="cmd_savePage" id="menu_savePage"
michael@0 152 label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"/>
michael@0 153 <menuitem command="cmd_pagesetup" id="menu_pageSetup"
michael@0 154 label="&pageSetupCmd.label;" accesskey="&pageSetupCmd.accesskey;"/>
michael@0 155 #ifndef XP_MACOSX
michael@0 156 <menuitem command="cmd_printpreview" id="menu_printPreview"
michael@0 157 label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"/>
michael@0 158 #endif
michael@0 159 <menuitem key="key_print" command="cmd_print" id="menu_print"
michael@0 160 label="&printCmd.label;" accesskey="&printCmd.accesskey;"/>
michael@0 161 <menuseparator/>
michael@0 162 <menuitem key="key_close" command="cmd_close" id="menu_close"
michael@0 163 label="&closeCmd.label;" accesskey="&closeCmd.accesskey;"/>
michael@0 164 </menupopup>
michael@0 165 </menu>
michael@0 166
michael@0 167 <menu id="menu_edit">
michael@0 168 <menupopup id="editmenu-popup">
michael@0 169 <menuitem id="menu_undo"/>
michael@0 170 <menuitem id="menu_redo"/>
michael@0 171 <menuseparator/>
michael@0 172 <menuitem id="menu_cut"/>
michael@0 173 <menuitem id="menu_copy"/>
michael@0 174 <menuitem id="menu_paste"/>
michael@0 175 <menuitem id="menu_delete"/>
michael@0 176 <menuseparator/>
michael@0 177 <menuitem id="menu_selectAll"/>
michael@0 178 <menuseparator/>
michael@0 179 <menuitem id="menu_find"/>
michael@0 180 <menuitem id="menu_findAgain"/>
michael@0 181 <menuseparator/>
michael@0 182 <menuitem id="menu_goToLine" key="key_goToLine" command="cmd_goToLine"
michael@0 183 label="&goToLineCmd.label;" accesskey="&goToLineCmd.accesskey;"/>
michael@0 184 </menupopup>
michael@0 185 </menu>
michael@0 186
michael@0 187 <menu id="menu_view" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
michael@0 188 <menupopup id="viewmenu-popup">
michael@0 189 <menuitem id="menu_reload" command="cmd_reload" accesskey="&reloadCmd.accesskey;"
michael@0 190 label="&reloadCmd.label;" key="key_reload"/>
michael@0 191 <menuseparator />
michael@0 192 <menu id="viewTextZoomMenu" label="&menu_textSize.label;" accesskey="&menu_textSize.accesskey;">
michael@0 193 <menupopup>
michael@0 194 <menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge"
michael@0 195 label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;"
michael@0 196 key="key_textZoomEnlarge"/>
michael@0 197 <menuitem id="menu_textReduce" command="cmd_textZoomReduce"
michael@0 198 label="&menu_textReduce.label;" accesskey="&menu_textReduce.accesskey;"
michael@0 199 key="key_textZoomReduce"/>
michael@0 200 <menuseparator/>
michael@0 201 <menuitem id="menu_textReset" command="cmd_textZoomReset"
michael@0 202 label="&menu_textReset.label;" accesskey="&menu_textReset.accesskey;"
michael@0 203 key="key_textZoomReset"/>
michael@0 204 </menupopup>
michael@0 205 </menu>
michael@0 206
michael@0 207 <!-- Charset Menu -->
michael@0 208 <menu id="charsetMenu"
michael@0 209 label="&charsetMenu.label;"
michael@0 210 accesskey="&charsetMenu.accesskey;"
michael@0 211 oncommand="BrowserSetCharacterSet(event);"
michael@0 212 onpopupshowing="CharsetMenu.build(event.target);"
michael@0 213 onpopupshown="CharsetMenu.update(event.target, content.document.characterSet);">
michael@0 214 <menupopup/>
michael@0 215 </menu>
michael@0 216 <menuseparator/>
michael@0 217 <menuitem id="menu_wrapLongLines" type="checkbox" command="cmd_wrapLongLines"
michael@0 218 label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/>
michael@0 219 <menuitem type="checkbox" id="menu_highlightSyntax" command="cmd_highlightSyntax"
michael@0 220 label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
michael@0 221 </menupopup>
michael@0 222 </menu>
michael@0 223 </menubar>
michael@0 224 </toolbox>
michael@0 225
michael@0 226 <vbox id="appcontent" flex="1">
michael@0 227
michael@0 228 <browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
michael@0 229 context="viewSourceContextMenu" showcaret="true" tooltip="aHTMLTooltip"/>
michael@0 230 <findbar id="FindToolbar" browserid="content"/>
michael@0 231 </vbox>
michael@0 232
michael@0 233 <statusbar id="status-bar" class="chromeclass-status">
michael@0 234 <statusbarpanel id="statusbar-line-col" label="" flex="1"/>
michael@0 235 </statusbar>
michael@0 236
michael@0 237 </window>

mercurial