<?xml version="1.0"?> <!-- -*- Mode: HTML -*- --> 
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?> 

<!-- 
   - The contents of this file are subject to the Mozilla Public
   - License Version 1.1 (the "License"); you may not use this file
   - except in compliance with the License. You may obtain a copy of
   - the License at http://www.mozilla.org/MPL/
   - 
   - Software distributed under the License is distributed on an "AS
   - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   - implied. See the License for the specific language governing
   - rights and limitations under the License.
   - 
   - The Original Code is mozilla.org viewsource frontend.
   - 
   - The Initial Developer of the Original Code is Netscape
   - Communications Corporation.  Portions created by Netscape are
   - Copyright (C) 2000 Netscape Communications Corporation.  All
   - Rights Reserved.
   - 
   - Contributor(s):
   -     Doron Rosenberg (doronr@naboonline.com)
  -->

<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>

<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % sourceDTD SYSTEM "chrome://navigator/locale/viewSource.dtd" >
%sourceDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
<!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
%contentAreaCommandsDTD;
]>

<window id="main-window" xmlns:html="http://www.w3.org/1999/xhtml"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	onload="onLoadViewSource();"
	contenttitlesetting="true"
	title="&mainWindow.title;" 
	titlemodifier="&mainWindow.titlemodifier;" 
	titlepreface="&mainWindow.preface;"
	titlemenuseparator ="&mainWindow.titlemodifierseperator;"  
	windowtype="navigator:view-source"
	orient="vertical" width="640" height="480"
	screenX="10" screenY="10"
	persist="screenX screenY width height sizemode">
 
  <script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
  <script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
  <script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
  <script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
  <script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
  <script type="application/x-javascript" src="chrome://navigator/content/viewsource.js"/>
  <script type="application/x-javascript" src="chrome://navigator/content/navigator.js"/>
  <script type="application/x-javascript" src="chrome://communicator/content/findUtils.js"/>
  <script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
  <script type="application/x-javascript" src="chrome://communicator/content/utilityOverlay.js"/>

  <commandset id="commands">    
    <commandset id="globalEditMenuItems"/>
    <commandset id="selectEditMenuItems"/>
    <commandset id="clipboardEditMenuItems"/>
  </commandset>
    
  <stringbundleset id="stringbundleset">
    <stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
  </stringbundleset>

  <!-- keys are appended from the overlay -->
  <keyset id="viewSourceKeys">
 <!-- File Menu -->
    <key id="key_newNavigator"/>
    <key id="key_newBlankPage"/>
    <key id="key_savePage"       key="&savePageCmd.commandkey;" command="Browser:SavePage" modifiers="accel"/>
    <key id="key_editPage"       key="&editPageCmd.commandkey;" command="Browser:EditPage" modifiers="accel"/>
    <key id="printKb"            key="&printCmd.commandkey;" command="Browser:Print"  modifiers="accel"/>
    <key id="key_close"/>

    <!-- Edit Menu -->
    <key id="key_undo"/>
    <key id="key_redo"/>
    <key id="key_cut"/>
    <key id="key_copy"/>
    <key id="key_paste"/>
    <key id="key_delete"/>
    <key id="key_selectAll"/>
    <key id="key_find"              key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
    <key id="key_findAgain"         key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
    <keyset id="viewZoomKeys"/>
  </keyset>

  <!-- Menu --> 
  <toolbox>
  <menubar id="zmain-menubar">
    <menu id="menu_File">
      <menupopup id="filemenu-popup">
        <menuitem label="&browserCmd.label;" accesskey="&browserCmd.accesskey;" key="key_newNavigator" observes="cmd_newNavigator"/>
        <menu id="menu_New">
          <menupopup id="menu_NewPopup">
            <menuitem id="menu_newNavigator" observes="cmd_newNavigator"/>
            <menuitem id="menu_newEditor"    observes="cmd_newEditor"/>
          </menupopup>
        </menu>
        
        <menuseparator/>

        <menuitem id="menu_close"/>
        <menuitem label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
        <menuitem id="savepage" label="&saveFrameCmd.label;" accesskey="&saveFrameCmd.accesskey;" oncommand="savePage(gFocusedURL);" hidden="true"/>
        <menuseparator/>
        <menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" oncommand="ViewSourceEditPage();"/>

       <menuseparator/>
        <menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="Browser:Print"/>     
<!--    <menuitem accesskey="&printPreviewCmd.accesskey;" observes="Browser:PrintPreview"/> -->
      </menupopup>
    </menu>

    <menu id="menu_Edit">
      <menupopup>
        <menuitem id="menu_undo"/>   
        <menuitem id="menu_redo"/>
        <menuseparator/>
        <menuitem id="menu_cut"/>
        <menuitem id="menu_copy"/>
        <menuitem id="menu_paste"/>
        <menuitem id="menu_delete"/>
        <menuseparator/>
        <menuitem id="menu_selectAll"/>
        <menuseparator /> 
        <menuitem id="menu_find" label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
        <menuitem id="menu_findAgain" label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
      </menupopup>
    </menu>
     
    <menu id="menu_view" accesskey="&viewMenu.accesskey;" label="&viewMenu.label;">
      <menupopup>
        <menu id="menu_textZoom"/>  
        <menuseparator/>
     <!--   <menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" observes="View:PageInfo"/>
        <menuseparator id="file_moduleSeparator"/>-->
        <menu id = "charsetMenu"/>
      </menupopup>
    </menu>

    <menu id="menu_Help"/>
  </menubar>  
  </toolbox>

  <vbox id="appcontent" flex="1"
       ondragover="nsDragAndDrop.dragOver(event, contentAreaDNDObserver);"
       ondraggesture="nsDragAndDrop.startDrag(event, contentAreaDNDObserver);"
       ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">

    <browser id="content" type="content-primary" name="content" src="about:blank" flex="1"/>

  </vbox>

</window>
