<?xml version="1.0"?>

<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1
   -
   - 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 Adblock Plus.
   -
   - The Initial Developer of the Original Code is
   - Wladimir Palant.
   - Portions created by the Initial Developer are Copyright (C) 2006-2009
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - ***** END LICENSE BLOCK ***** -->

<?xml-stylesheet href="chrome://autoproxy/skin/overlay.css" type="text/css"?>

<!DOCTYPE overlay [
<!ENTITY % overlayDTD SYSTEM "chrome://autoproxy/locale/overlay.dtd">
%overlayDTD;
<!ENTITY % settingsDTD SYSTEM "chrome://autoproxy/locale/settings.dtd">
%settingsDTD;
]>

<overlay id="aup-overlay-general" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script type="application/x-javascript;version=1.7" src="overlay.js"/>

  <popupset id="aup-popupset">
    <tooltip id="aup-tooltip" orient="vertical">
      <description id="aup-tooltip-action" hidden="true"/>
      <label id="aup-tooltip-status-label" value="&status.tooltip;"/>
      <description id="aup-tooltip-status"/>
      <label id="aup-tooltip-proxy-label" value="&defaultProxy.tooltip;"/>
      <description id="aup-tooltip-proxy"/>
      <label id="aup-tooltip-blocked-label" value="&blocked.tooltip;" hidden="true"/>
      <description id="aup-tooltip-blocked" hidden="true"/>
      <label id="aup-tooltip-filters-label" value="&filters.tooltip;" hidden="true"/>
      <vbox id="aup-tooltip-filters" hidden="true"/>
    </tooltip>
    <menupopup id="aup-status-popup">
      <menuitem id="aup-status-settings" label="&settings.label;..." accesskey="&settings.accesskey;" key="aup-key-settings" command="aup-command-settings"/>
      <menuitem id="aup-status-report" label="&report.label;..." accesskey="&report.accesskey;" key="aup-key-report" command="aup-command-report"/>
      <menuitem id="aup-status-opensidebar" label="&opensidebar.label;" accesskey="&opensidebar.accesskey;" key="aup-key-sidebar" command="aup-command-sidebar"/>
      <menuitem id="aup-status-closesidebar" label="&closesidebar.label;" accesskey="&closesidebar.accesskey;" key="aup-key-sidebar" command="aup-command-sidebar"/>
      <menuseparator/>
      <menu id="aup-status-defaultProxy" key="aup-key-contextmenu">
        <menupopup/>
      </menu>
      <menuseparator/>
      <!--"Enable Proxy On" menu items will be insert here by JS-->
      <menuitem id="aup-status-modeauto" label="&mode.auto.label;" accesskey="&mode.auto.accesskey;" type="radio" key="aup-key-modeauto" command="aup-command-modeauto"/>
      <menuitem id="aup-status-modeglobal" label="&mode.global.label;" accesskey="&mode.global.accesskey;" type="radio" key="aup-key-modeglobal" command="aup-command-modeglobal"/>
      <menuitem id="aup-status-modedisabled" label="&mode.disabled.label;" accesskey="&mode.disabled.accesskey;" type="radio" key="aup-key-modedisabled" command="aup-command-modedisabled"/>
    </menupopup>
    <menupopup id="aup-popup-defaultProxyList"></menupopup>
    <tooltip id="cycleDefaultProxy"></tooltip>
  </popupset>
  <keyset id="aup-keyset"/>
  <commandset id="aup-commandset">
    <!-- Dummy oncommand attributes are work-arounds for bug 371900 -->
    <command id="aup-command-settings" oncommand="//"/>
    <command id="aup-command-report" oncommand="//"/>
    <command id="aup-command-sidebar" oncommand="//"/>
    <command id="aup-command-contextmenu" oncommand="//"/>
    <command id="aup-command-modeauto" oncommand="//"/>
    <command id="aup-command-modeglobal" oncommand="//"/>
    <command id="aup-command-modedisabled" oncommand="//"/>
  </commandset>

  <statusbarpanel id="aup-status" context="aup-status-popup">
    <image tooltip="aup-tooltip"/>
    <label tooltip="aup-tooltip"/>
  </statusbarpanel>

  <toolbarbutton id="aup-toolbarbutton" label="&toolbarbutton.label;"
      tooltip="aup-tooltip" context="aup-status-popup">
    <menupopup id="aup-toolbar-popup"/>
  </toolbarbutton>

  <!-- Tools menu -->
  <menuitem id="aup-menuitem" label="&menuitem.label;..." accesskey="&menuitem.accesskey;" key="aup-key-settings" command="aup-command-settings"/>

  <!-- View menu -->
  <menuitem id="aup-blockableitems" label="&view.blockableItems.label;" type="checkbox" autocheck="false" key="aup-key-sidebar" command="aup-command-sidebar"/>

  <!-- Fake sidebar -->
  <splitter id="aup-sidebar-splitter" hidden="true"/>
  <vbox id="aup-sidebar" height="200" width="200" hidden="true" persist="height width">
    <toolbox id="aup-sidebar-header">
      <toolbar id="aup-sidebar-toolbar" align="center" grippyhidden="true" fullscreentoolbar="true">
        <label id="aup-sidebar-title" control="aup-sidebar-browser" value="&sidebar.title;" flex="1" crop="end"/>
        <toolbarbutton id="aup-sidebar-close" command="aup-command-sidebar" tooltiptext="&closesidebar.label;"/>
      </toolbar>
    </toolbox>
    <iframe id="aup-sidebar-browser" flex="1" src=""/>
  </vbox>
</overlay>
