1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/viewsource/content/viewSource.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,237 @@ 1.4 +<?xml version="1.0"?> 1.5 +# -*- Mode: HTML -*- 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 1.11 +<?xml-stylesheet href="chrome://global/content/viewSource.css" type="text/css"?> 1.12 +<?xml-stylesheet href="chrome://mozapps/skin/viewsource/viewsource.css" type="text/css"?> 1.13 +<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?> 1.14 + 1.15 +<!DOCTYPE window [ 1.16 +<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > 1.17 +%brandDTD; 1.18 +<!ENTITY % sourceDTD SYSTEM "chrome://global/locale/viewSource.dtd" > 1.19 +%sourceDTD; 1.20 +<!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" > 1.21 +%charsetDTD; 1.22 +]> 1.23 + 1.24 +<window id="viewSource" 1.25 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.26 + onload="onLoadViewSource();" 1.27 + contenttitlesetting="true" 1.28 + title="&mainWindow.title;" 1.29 + titlemodifier="&mainWindow.titlemodifier;" 1.30 + titlepreface="&mainWindow.preface;" 1.31 + titlemenuseparator ="&mainWindow.titlemodifierseparator;" 1.32 + windowtype="navigator:view-source" 1.33 + width="640" height="480" 1.34 + screenX="10" screenY="10" 1.35 + persist="screenX screenY width height sizemode"> 1.36 + 1.37 + <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/> 1.38 + <script type="application/javascript" src="chrome://global/content/printUtils.js"/> 1.39 + <script type="application/javascript" src="chrome://global/content/viewSource.js"/> 1.40 + <script type="application/javascript" src="chrome://global/content/viewZoomOverlay.js"/> 1.41 + <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/> 1.42 + 1.43 + <stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/> 1.44 + 1.45 + <command id="cmd_savePage" oncommand="ViewSourceSavePage();"/> 1.46 + <command id="cmd_print" oncommand="PrintUtils.print();"/> 1.47 + <command id="cmd_printpreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/> 1.48 + <command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/> 1.49 + <command id="cmd_close" oncommand="window.close();"/> 1.50 + <commandset id="editMenuCommands"/> 1.51 + <command id="cmd_find" 1.52 + oncommand="document.getElementById('FindToolbar').onFindCommand();"/> 1.53 + <command id="cmd_findAgain" 1.54 + oncommand="document.getElementById('FindToolbar').onFindAgainCommand(false);"/> 1.55 + <command id="cmd_findPrevious" 1.56 + oncommand="document.getElementById('FindToolbar').onFindAgainCommand(true);"/> 1.57 +#ifdef XP_MACOSX 1.58 + <command id="cmd_findSelection" 1.59 + oncommand="document.getElementById('FindToolbar').onFindSelectionCommand();"/> 1.60 +#endif 1.61 + <command id="cmd_reload" oncommand="ViewSourceReload();"/> 1.62 + <command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/> 1.63 + <command id="cmd_highlightSyntax" oncommand="highlightSyntax();"/> 1.64 + <command id="cmd_wrapLongLines" oncommand="wrapLongLines()"/> 1.65 + <command id="cmd_textZoomReduce" oncommand="ZoomManager.reduce();"/> 1.66 + <command id="cmd_textZoomEnlarge" oncommand="ZoomManager.enlarge();"/> 1.67 + <command id="cmd_textZoomReset" oncommand="ZoomManager.reset();"/> 1.68 + 1.69 + <command id="Browser:Back" oncommand="BrowserBack();" observes="viewSourceNavigation"/> 1.70 + <command id="Browser:Forward" oncommand="BrowserForward();" observes="viewSourceNavigation"/> 1.71 + 1.72 + <broadcaster id="viewSourceNavigation"/> 1.73 + 1.74 + <keyset id="editMenuKeys"/> 1.75 + <keyset id="viewSourceKeys"> 1.76 + <key id="key_savePage" key="&savePageCmd.commandkey;" modifiers="accel" command="cmd_savePage"/> 1.77 + <key id="key_print" key="&printCmd.commandkey;" modifiers="accel" command="cmd_print"/> 1.78 + <key id="key_close" key="&closeCmd.commandkey;" modifiers="accel" command="cmd_close"/> 1.79 + <key id="key_goToLine" key="&goToLineCmd.commandkey;" command="cmd_goToLine" modifiers="accel"/> 1.80 + 1.81 + <key id="key_textZoomEnlarge" key="&textEnlarge.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/> 1.82 + <key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/> 1.83 + <key id="key_textZoomEnlarge3" key="&textEnlarge.commandkey3;" command="cmd_textZoomEnlarge" modifiers="accel"/> 1.84 + <key id="key_textZoomReduce" key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/> 1.85 + <key id="key_textZoomReduce2" key="&textReduce.commandkey2;" command="cmd_textZoomReduce" modifiers="accel"/> 1.86 + <key id="key_textZoomReset" key="&textReset.commandkey;" command="cmd_textZoomReset" modifiers="accel"/> 1.87 + <key id="key_textZoomReset2" key="&textReset.commandkey2;" command="cmd_textZoomReset" modifiers="accel"/> 1.88 + 1.89 + <key id="key_reload" key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel"/> 1.90 + <key key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel,shift"/> 1.91 + <key keycode="VK_F5" command="cmd_reload"/> 1.92 + <key keycode="VK_F5" command="cmd_reload" modifiers="accel"/> 1.93 + <key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/> 1.94 + <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/> 1.95 + <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/> 1.96 +#ifdef XP_MACOSX 1.97 + <key id="key_findSelection" key="&findSelectionCmd.commandkey;" command="cmd_findSelection" modifiers="accel"/> 1.98 +#endif 1.99 + <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/> 1.100 + <key keycode="&findAgainCmd.commandkey2;" command="cmd_findPrevious" modifiers="shift"/> 1.101 + 1.102 + <key keycode="VK_BACK" command="Browser:Back"/> 1.103 + <key keycode="VK_BACK" command="Browser:Forward" modifiers="shift"/> 1.104 +#ifndef XP_MACOSX 1.105 + <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/> 1.106 + <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/> 1.107 +#else 1.108 + <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="accel" /> 1.109 + <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="accel" /> 1.110 +#endif 1.111 +#ifdef XP_UNIX 1.112 + <key id="goBackKb2" key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/> 1.113 + <key id="goForwardKb2" key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/> 1.114 +#endif 1.115 + 1.116 + </keyset> 1.117 + 1.118 + <tooltip id="aHTMLTooltip" page="true"/> 1.119 + 1.120 + <menupopup id="viewSourceContextMenu" 1.121 + onpopupshowing="contextMenuShowing();"> 1.122 + <menuitem id="context-back" 1.123 + label="&backCmd.label;" 1.124 + accesskey="&backCmd.accesskey;" 1.125 + command="Browser:Back" 1.126 + observes="viewSourceNavigation"/> 1.127 + <menuitem id="context-forward" 1.128 + label="&forwardCmd.label;" 1.129 + accesskey="&forwardCmd.accesskey;" 1.130 + command="Browser:Forward" 1.131 + observes="viewSourceNavigation"/> 1.132 + <menuseparator observes="viewSourceNavigation"/> 1.133 + <menuitem id="cMenu_findAgain"/> 1.134 + <menuseparator/> 1.135 + <menuitem id="cMenu_copy"/> 1.136 + <menuitem id="context-copyLink" 1.137 + label="©LinkCmd.label;" 1.138 + accesskey="©LinkCmd.accesskey;" 1.139 + oncommand="contextMenuCopyLinkOrEmail();"/> 1.140 + <menuitem id="context-copyEmail" 1.141 + label="©EmailCmd.label;" 1.142 + accesskey="©EmailCmd.accesskey;" 1.143 + oncommand="contextMenuCopyLinkOrEmail();"/> 1.144 + <menuseparator/> 1.145 + <menuitem id="cMenu_selectAll"/> 1.146 + </menupopup> 1.147 + 1.148 + <!-- Menu --> 1.149 + <toolbox id="viewSource-toolbox"> 1.150 + <menubar id="viewSource-main-menubar"> 1.151 + 1.152 + <menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;"> 1.153 + <menupopup id="menu_FilePopup"> 1.154 + <menuitem key="key_savePage" command="cmd_savePage" id="menu_savePage" 1.155 + label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"/> 1.156 + <menuitem command="cmd_pagesetup" id="menu_pageSetup" 1.157 + label="&pageSetupCmd.label;" accesskey="&pageSetupCmd.accesskey;"/> 1.158 +#ifndef XP_MACOSX 1.159 + <menuitem command="cmd_printpreview" id="menu_printPreview" 1.160 + label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"/> 1.161 +#endif 1.162 + <menuitem key="key_print" command="cmd_print" id="menu_print" 1.163 + label="&printCmd.label;" accesskey="&printCmd.accesskey;"/> 1.164 + <menuseparator/> 1.165 + <menuitem key="key_close" command="cmd_close" id="menu_close" 1.166 + label="&closeCmd.label;" accesskey="&closeCmd.accesskey;"/> 1.167 + </menupopup> 1.168 + </menu> 1.169 + 1.170 + <menu id="menu_edit"> 1.171 + <menupopup id="editmenu-popup"> 1.172 + <menuitem id="menu_undo"/> 1.173 + <menuitem id="menu_redo"/> 1.174 + <menuseparator/> 1.175 + <menuitem id="menu_cut"/> 1.176 + <menuitem id="menu_copy"/> 1.177 + <menuitem id="menu_paste"/> 1.178 + <menuitem id="menu_delete"/> 1.179 + <menuseparator/> 1.180 + <menuitem id="menu_selectAll"/> 1.181 + <menuseparator/> 1.182 + <menuitem id="menu_find"/> 1.183 + <menuitem id="menu_findAgain"/> 1.184 + <menuseparator/> 1.185 + <menuitem id="menu_goToLine" key="key_goToLine" command="cmd_goToLine" 1.186 + label="&goToLineCmd.label;" accesskey="&goToLineCmd.accesskey;"/> 1.187 + </menupopup> 1.188 + </menu> 1.189 + 1.190 + <menu id="menu_view" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;"> 1.191 + <menupopup id="viewmenu-popup"> 1.192 + <menuitem id="menu_reload" command="cmd_reload" accesskey="&reloadCmd.accesskey;" 1.193 + label="&reloadCmd.label;" key="key_reload"/> 1.194 + <menuseparator /> 1.195 + <menu id="viewTextZoomMenu" label="&menu_textSize.label;" accesskey="&menu_textSize.accesskey;"> 1.196 + <menupopup> 1.197 + <menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge" 1.198 + label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;" 1.199 + key="key_textZoomEnlarge"/> 1.200 + <menuitem id="menu_textReduce" command="cmd_textZoomReduce" 1.201 + label="&menu_textReduce.label;" accesskey="&menu_textReduce.accesskey;" 1.202 + key="key_textZoomReduce"/> 1.203 + <menuseparator/> 1.204 + <menuitem id="menu_textReset" command="cmd_textZoomReset" 1.205 + label="&menu_textReset.label;" accesskey="&menu_textReset.accesskey;" 1.206 + key="key_textZoomReset"/> 1.207 + </menupopup> 1.208 + </menu> 1.209 + 1.210 + <!-- Charset Menu --> 1.211 + <menu id="charsetMenu" 1.212 + label="&charsetMenu.label;" 1.213 + accesskey="&charsetMenu.accesskey;" 1.214 + oncommand="BrowserSetCharacterSet(event);" 1.215 + onpopupshowing="CharsetMenu.build(event.target);" 1.216 + onpopupshown="CharsetMenu.update(event.target, content.document.characterSet);"> 1.217 + <menupopup/> 1.218 + </menu> 1.219 + <menuseparator/> 1.220 + <menuitem id="menu_wrapLongLines" type="checkbox" command="cmd_wrapLongLines" 1.221 + label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/> 1.222 + <menuitem type="checkbox" id="menu_highlightSyntax" command="cmd_highlightSyntax" 1.223 + label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/> 1.224 + </menupopup> 1.225 + </menu> 1.226 + </menubar> 1.227 + </toolbox> 1.228 + 1.229 + <vbox id="appcontent" flex="1"> 1.230 + 1.231 + <browser id="content" type="content-primary" name="content" src="about:blank" flex="1" 1.232 + context="viewSourceContextMenu" showcaret="true" tooltip="aHTMLTooltip"/> 1.233 + <findbar id="FindToolbar" browserid="content"/> 1.234 + </vbox> 1.235 + 1.236 + <statusbar id="status-bar" class="chromeclass-status"> 1.237 + <statusbarpanel id="statusbar-line-col" label="" flex="1"/> 1.238 + </statusbar> 1.239 + 1.240 +</window>