home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 December / PCWorld_2005-12_cd.bin / komunikace / netscape / nsb-install-8-0.exe / chrome / toolkit.jar / content / global / viewSource.xul < prev    next >
Extensible Markup Language  |  2005-09-26  |  9KB  |  179 lines

  1. <?xml version="1.0"?>
  2.  
  3. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
  4. <?xml-stylesheet href="chrome://global/content/viewSource.css" type="text/css"?> 
  5. <?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?>
  6. <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
  7. <?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
  8.  
  9. <!DOCTYPE window [
  10. <!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
  11. %brandDTD;
  12. <!ENTITY % sourceDTD SYSTEM "chrome://global/locale/viewSource.dtd" >
  13. %sourceDTD;
  14. <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
  15. %browserDTD;
  16. <!ENTITY % findDTD SYSTEM "chrome://global/locale/finddialog.dtd" >
  17. %findDTD;
  18. ]>
  19.  
  20. <window id="main-window"
  21.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  22.         onload="onLoadViewSource();"
  23.         onunload="onUnloadViewSource();"
  24.         contenttitlesetting="true"
  25.         title="&mainWindow.title;" 
  26.         titlemodifier="&mainWindow.titlemodifier;" 
  27.         titlepreface="&mainWindow.preface;"
  28.         titlemenuseparator ="&mainWindow.titlemodifierseparator;"  
  29.         windowtype="navigator:view-source"
  30.         width="640" height="480"
  31.         screenX="10" screenY="10"
  32.         persist="screenX screenY width height sizemode">
  33.  
  34.   <script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
  35.   <script type="application/x-javascript" src="chrome://global/content/printUtils.js"/>
  36.   <script type="application/x-javascript" src="chrome://global/content/viewSource.js"/>
  37.   <script type="application/x-javascript" src="chrome://global/content/viewZoomOverlay.js"/>
  38.   <script type="application/x-javascript" src="chrome://global/content/findBar.js"/>
  39.   <script type="application/x-javascript" src="chrome://browser/content/contentAreaUtils.js"/>
  40.   <stringbundle id="bundle_findBar" src="chrome://browser/locale/browser.properties"/>
  41.   <stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/>
  42.  
  43.   <command id="cmd_savePage" oncommand="ViewSourceSavePage();"/>
  44.   <command id="cmd_print" oncommand="PrintUtils.print();"/>
  45.   <command id="cmd_printpreview" oncommand="PrintUtils.printPreview(onEnterPP, onExitPP);"/>
  46.   <command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/>
  47.   <command id="cmd_close" oncommand="window.close();"/>
  48.   <commandset id="editMenuCommands"/>
  49.   <command id="cmd_find" oncommand="onFindCmd();"/>
  50.   <command id="cmd_findAgain" oncommand="onFindAgainCmd();"/>
  51.   <command id="cmd_findPrevious" oncommand="onFindPreviousCmd();"/>    
  52.   <command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/>
  53.   <command id="cmd_highlightSyntax" oncommand="highlightSyntax();"/>
  54.   <command id="cmd_wrapLongLines" oncommand="wrapLongLines()"/>
  55.   <command id="cmd_textZoomReduce" oncommand="ZoomManager.prototype.getInstance().reduce();"/>
  56.   <command id="cmd_textZoomEnlarge" oncommand="ZoomManager.prototype.getInstance().enlarge();"/>
  57.  
  58.   <keyset id="editMenuKeys"/>
  59.   <keyset id="viewSourceKeys">
  60.     <key id="key_savePage" key="&savePageCmd.commandkey;" modifiers="accel" command="cmd_savePage"/>
  61.     <key id="key_print" key="&printCmd.commandkey;" modifiers="accel" command="cmd_print"/>
  62.     <key id="key_close" key="&closeCmd.commandkey;" modifiers="accel" command="cmd_close"/>
  63.     <key id="key_goToLine"     key="&goToLineCmd.commandkey;"  command="cmd_goToLine"  modifiers="accel"/>
  64.  
  65.     <key id="key_textZoomEnlarge" key="&textEnlarge.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/>
  66.     <key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
  67.     <key id="key_textZoomReduce"  key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
  68.     <key id="key_textZoomReset" key="&textReset.commandkey;" oncommand="ZoomManager.prototype.getInstance().reset();" modifiers="accel"/>
  69.     <key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
  70.     <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
  71.     <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
  72.     <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
  73.     <key keycode="&findAgainCmd.commandkey2;"  command="cmd_findPrevious" modifiers="shift"/>
  74.   </keyset>
  75.  
  76.   <popup id="viewSourceContextMenu">
  77.     <menuitem id="cMenu_findAgain"/>
  78.     <menuseparator/>
  79.     <menuitem id="cMenu_copy"/>
  80.     <menuseparator/>
  81.     <menuitem id="cMenu_selectAll"/>
  82.   </popup>
  83.  
  84.   <!-- Menu --> 
  85.   <toolbox id="viewSource-toolbox">
  86.     <menubar id="viewSource-main-menubar">
  87.  
  88.       <menu label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
  89.         <menupopup id="filemenu-popup">
  90.           <menuitem key="key_savePage" command="cmd_savePage"
  91.                     label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"/>
  92.           <menuitem command="cmd_pagesetup"
  93.                     label="&pageSetupCmd.label;" accesskey="&pageSetupCmd.accesskey;"/>
  94.           <menuitem command="cmd_printpreview"
  95.                     label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"/>
  96.           <menuitem key="key_print" command="cmd_print"
  97.                     label="&printCmd.label;" accesskey="&printCmd.accesskey;"/>
  98.           <menuseparator/>
  99.           <menuitem key="key_close" command="cmd_close"
  100.                     label="&closeCmd.label;" accesskey="&closeCmd.accesskey;"/>
  101.         </menupopup>
  102.       </menu>
  103.  
  104.       <menu id="menu_edit">
  105.         <menupopup>
  106.           <menuitem id="menu_undo"/>
  107.           <menuitem id="menu_redo"/>
  108.           <menuseparator/>
  109.           <menuitem id="menu_cut"/>
  110.           <menuitem id="menu_copy"/>
  111.           <menuitem id="menu_paste"/>
  112.           <menuitem id="menu_delete"/>
  113.           <menuseparator/>
  114.           <menuitem id="menu_selectAll"/>
  115.           <menuseparator/>
  116.           <menuitem id="menu_find"/>
  117.           <menuitem id="menu_findAgain"/>
  118.           <menuseparator/>
  119.           <menuitem id="menu_goToLine" key="key_goToLine" command="cmd_goToLine"
  120.                     label="&goToLineCmd.label;" accesskey="&goToLineCmd.accesskey;"/>
  121.         </menupopup>
  122.       </menu>
  123.  
  124.       <menu label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
  125.         <menupopup>
  126.           <menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge"
  127.                     label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;"
  128.                     key="key_textZoomEnlarge"/>
  129.           <menuitem id="menu_textReduce" command="cmd_textZoomReduce"
  130.                     label="&menu_textReduce.label;" accesskey="&menu_textReduce.accesskey;"
  131.                     key="key_textZoomReduce"/>
  132.           <menu id="charsetMenu"/>
  133.           <menuseparator/>
  134.           <menuitem id="menu_wrapLongLines" type="checkbox" command="cmd_wrapLongLines"
  135.                     label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/>
  136.           <menuitem type="checkbox" id="menu_highlightSyntax" command="cmd_highlightSyntax"
  137.                     label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
  138.         </menupopup>
  139.       </menu>
  140.     </menubar>  
  141.   </toolbox>
  142.  
  143.   <vbox id="appcontent" flex="1"
  144.        ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
  145.  
  146.     <browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
  147.              context="viewSourceContextMenu"/>
  148.     <toolbar id="FindToolbar" hidden="true" align="center" fullscreentoolbar="true">
  149.  
  150.       <toolbarbutton id="find-closebutton" class="tabs-closebutton" tooltiptext="&findCloseButton.tooltip;"
  151.                      oncommand="closeFindBar();"/>
  152.  
  153.       <label value="&find.label;"/>
  154.       <hbox id="find-field-container">
  155.         <textbox id="find-field" oninput="find(this.value);" onfocus="onFindBarFocus();"
  156.                 onkeypress="onFindBarKeyPress(event);" onblur="onFindBarBlur();"/>
  157.       </hbox>
  158.       <toolbarbutton id="find-next" class="toolbarbutton-1" label="&findNext.label;" tooltiptext="&findNext.tooltip;"
  159.                      command="cmd_findAgain" disabled="true"/>
  160.  
  161.       <toolbarbutton id="find-previous" class="toolbarbutton-1" label="&findPrevious.label;" tooltiptext="&findPrevious.tooltip;"
  162.                      command="cmd_findPrevious" disabled="true"/>
  163.  
  164.       <toolbarbutton id="highlight" class="toolbarbutton-1" label="&highlight.label;" tooltiptext="&highlight.tooltip;"
  165.                      oncommand="toggleHighlight(!this.checked);
  166.                                 if (gFindMode != FIND_NORMAL) setFindCloseTimeout();"
  167.                      type="checkbox" disabled="true"/>
  168.  
  169.       <checkbox id="find-case-sensitive" oncommand="toggleCaseSensitivity(this.checked);"
  170.                 label="&caseSensitiveCheckbox.label;" accesskey="&caseSensitiveCheckbox.accesskey;"/>
  171.       <image id="find-status-icon"/>
  172.       <label id="find-status"/>
  173.     </toolbar>
  174.  
  175.  
  176.   </vbox> 
  177.  
  178. </window>
  179.