<?xml version="1.0" encoding="UTF-8"?>
<!--
  FoxyProxy
  Copyright (C) 2006-2008 Eric H. Jung and LeahScape, Inc.
  http://foxyproxy.mozdev.org/
  eric.jung@yahoo.com
  
  This source code is released under the GPL license,
  available in the LICENSE file at the root of this installation
  and also online at http://www.gnu.org/licenses/gpl.txt
-->

<?xml-stylesheet href="foxyproxy.css" type="text/css"?>
<?xul-overlay href="includes.xul"?>
<!DOCTYPE overlay SYSTEM "chrome://foxyproxy/locale/foxyproxy.dtd">
<window id="foxyproxyoptions2" windowtype="foxyproxy-options"
  title="&foxyproxy.optionsdialog.label;"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:html="http://www.w3.org/1999/xhtml" persist="screenX screenY"
  onload="onLoad();" onunload="onOK();" context="mainPopup">

  <script src="options.js" />
  <vbox>
    <!-- menu -->
    <toolbox>
      <menubar id="menubar">
        <menu id="file-menu" label="&foxyproxy.menubar.file.label;"
          accesskey="&foxyproxy.menubar.file.accesskey;"
          tooltiptext="&foxyproxy.menubar.file.tooltip;">
          <menupopup id="file-popup">
            <menuitem command="createProxyCmd"
              tooltiptext="&foxyproxy.addnewproxy.tooltip;" />
            <!-- tooltiptext is necessary for tooltip, dunno why -->
            <menuseparator />
            <menuitem command="torWizardCmd"
              tooltiptext="&foxyproxy.tor.tooltip;" />
            <!-- tooltiptext is necessary for tooltip, dunno why -->
            <menuseparator />
            <!-- <menuitem command="importSettingsCmd" tooltiptext="&foxyproxy.importsettings.tooltip;"/>-->
            <!-- tooltiptext is necessary for tooltip, dunno why -->
            <!-- <menuitem command="exportSettingsCmd" tooltiptext="&foxyproxy.exportsettings.tooltip;"/>-->
            <!-- tooltiptext is necessary for tooltip, dunno why -->
            <!-- <menuitem command="importListCmd" tooltiptext="&foxyproxy.importlist.tooltip;"/> -->
            <!-- tooltiptext is necessary for tooltip, dunno why -->
            <!-- <menuseparator/> -->
            <menuitem command="closeCmd"
              tooltiptext="&foxyproxy.close.tooltip;" />
            <!-- tooltiptext is necessary for tooltip, dunno why -->
          </menupopup>
        </menu>
        <menu id="help-menu" label="&foxyproxy.menubar.help.label;"
          accesskey="&foxyproxy.menubar.help.accesskey;"
          tooltiptext="&foxyproxy.menubar.help.tooltip;">
          <menupopup id="edit-popup">
            <menuitem command="helpCmd"
              tooltiptext="&foxyproxy.help.tooltip;" />
            <!-- tooltiptext is necessary for tooltip, dunno why -->
            <menuitem command="onlineCmd"
              tooltiptext="&foxyproxy.online.tooltip;" />
            <!-- tooltiptext is necessary for tooltip, dunno why -->
            <menuitem command="aboutCmd"
              tooltiptext="&foxyproxy.about.tooltip;" />
            <!-- tooltiptext is necessary for tooltip, dunno why -->
          </menupopup>
        </menu>
      </menubar>
    </toolbox>
  </vbox>

  <separator class="thin"/>
  <hbox style="margin-left: 1em;" align="center">
    <label value="&foxyproxy.mode.label;:"
      tooltiptext="&foxyproxy.mode.tooltip;"
      accesskey="&foxyproxy.mode.accesskey;" command="modeMenuPopup" />
    <menulist id="modeMenu" oncommand="onEnableTypeChanged(this);"
      tooltiptext="&foxyproxy.mode.tooltip;">
      <menupopup id="modeMenuPopup" />
    </menulist>
  </hbox>

  <tabbox flex="1" style="margin: .5em;">
    <tabs id="tabs"
      onselect="foxyproxy.selectedTabIndex=this.selectedIndex;">
      <tab label="&foxyproxy.tab.proxies.label;"
        accesskey="&foxyproxy.tab.proxies.accesskey;" selected="true"
        tooltiptext="&foxyproxy.tab.proxies.tooltip;" />
      <tab label="&foxyproxy.tab.global.label;"
        accesskey="&foxyproxy.tab.global.accesskey;"
        tooltiptext="&foxyproxy.tab.global.tooltip;" />
      <tab label="&foxyproxy.quickadd.label;"
        accesskey="&foxyproxy.quickadd.accesskey;"
        tooltiptext="&foxyproxy.quickadd.tooltip;" />
      <tab label="&foxyproxy.tab.autoadd.label;"
        accesskey="&foxyproxy.tab.autoadd.accesskey;"
        tooltiptext="&foxyproxy.tab.autoadd.tooltip;" />
      <tab label="&foxyproxy.tab.logging.label;"
        accesskey="&foxyproxy.tab.logging.accesskey;"
        tooltiptext="&foxyproxy.tab.logging.tooltip;" />
    </tabs>

    <tabpanels style="-moz-appearance: none;" flex="1">

      <!--  proxy tree -->
      <tabpanel flex="1" orient="vertical">
        <separator class="thin" />

        <hbox flex="1">
          <tree id="proxyTree" align="stretch" enableColumnDrag="true"
            flex="1" style="width: 5em; height: 2em;" seltype="single"
            onselect="onProxyTreeSelected();"
            onclick="overlay.onTreeClick(event, this);">
            <treecols
              pickertooltiptext="&foxyproxy.tree.pickertooltiptext.label;">
              <treecol id="enabledCol" label="&foxyproxy.enabled.label;"
                flex="1" persist="width ordinal hidden" type="checkbox" />
              <splitter class="tree-splitter" />
              <treecol id="nameCol" label="&foxyproxy.proxy.name.label;"
                primary="true" flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="descriptionCol"
                label="&foxyproxy.proxy.notes.label;" flex="1"
                persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="modeCol" label="&foxyproxy.mode.label;"
                hidden="true" flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="hostCol" label="&foxyproxy.host.label;"
                hidden="true" flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="portCol" label="&foxyproxy.port.label;"
                hidden="true" flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="isSocksCol" label="&foxyproxy.issocks.label;"
                hidden="true" flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="socksverCol"
                label="&foxyproxy.socks.version.label;" hidden="true"
                flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="autopacCol"
                label="&foxyproxy.autopacurl.label;" hidden="true"
                flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="animatedIconsCol"
                label="&foxyproxy.animatedicons.label;" hidden="true"
                flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
              <treecol id="cycleCol"
                label="&foxyproxy.includeincycle.label;" hidden="true"
                flex="1" persist="width ordinal hidden" />
              <splitter class="tree-splitter" />
            </treecols>
            <treechildren id="proxyTreeChildren" flex="1"
              ondblclick="onSettings(false);" context="proxyTreeMenu" />
          </tree>
          <vbox>
            <button id="up-button" pack="start" command="moveUpCmd"
              label=" &foxyproxy.moveup.label;" />
            <button id="down-button" pack="start" command="moveDownCmd"
              label=" &foxyproxy.movedown.label;" />
            <separator />
            <button command="createProxyCmd" />
            <button command="settingsCmd" />
            <button command="copySelectionCmd" />
            <button command="deleteSelectionCmd" />
          </vbox>
        </hbox>
      </tabpanel>

      <!-- global settings -->
      <tabpanel flex="1" orient="vertical">
        <separator class="thin" />
        <grid>
          <columns>
            <column flex="1" />
            <column flex="1" />
          </columns>
          <rows>
            <row>
              <groupbox>
                <caption label="&foxyproxy.indicators.label;"
                  tooltiptext="&foxyproxy.indicators.tooltip;" />
                <hbox align="center">
                  <checkbox id="statusbarIconEnabled"
                    label="&foxyproxy.showstatusbaricon.label;"
                    accesskey="&foxyproxy.showstatusbaricon.accesskey;"
                    tooltiptext="&foxyproxy.showstatusbaricon.tooltip;"
                    oncommand="foxyproxy.statusbar.iconEnabled = this.checked;" />
                </hbox>
                <hbox align="center">
                  <checkbox id="statusbarTextEnabled"
                    label="&foxyproxy.showstatusbarmode.label;"
                    accesskey="&foxyproxy.showstatusbarmode.accesskey;"
                    tooltiptext="&foxyproxy.showstatusbarmode.tooltip;"
                    oncommand="onToggleStatusBarText(this.checked);" />
                </hbox>
                <hbox align="center" class="indent">
                  <label value="&foxyproxy.statusbarwidth.label;"
                    observes="statusBarWidthBroadcaster" />
                  <textbox id="statusbarWidth" size="1" type="timed"
                    timeout="500"
                    oncommand="foxyproxy.statusbar.width = this.value"
                    tooltiptext="&foxyproxy.statusbarwidth.tooltip;"
                    accesskey="&foxyproxy.statusbarwidth.accesskey;"
                    observes="statusBarWidthBroadcaster" />
                  <label value="&foxyproxy.pixels;"
                    observes="statusBarWidthBroadcaster" />
                  <label value="&foxyproxy.unlimited.label;"
                    observes="statusBarWidthBroadcaster" />
                </hbox>
                <hbox align="center">
                  <checkbox id="toolsMenuEnabled"
                    label="&foxyproxy.toolsmenu.label;"
                    accesskey="&foxyproxy.toolsmenu.accesskey;"
                    tooltiptext="&foxyproxy.toolsmenu.tooltip;"
                    oncommand="foxyproxy.toolsMenu = this.checked;" />
                </hbox>
                <hbox align="center">
                  <checkbox id="contextMenuEnabled"
                    label="&foxyproxy.contextmenu.label;"
                    accesskey="&foxyproxy.contextmenu.accesskey;"
                    tooltiptext="&foxyproxy.contextmenu.tooltip;"
                    oncommand="foxyproxy.contextMenu = this.checked;" />
                </hbox>
              </groupbox>
              <groupbox>
                <caption label="&foxyproxy.toolbaractivation.label;"
                  tooltiptext="&foxyproxy.toolbaractivation.tooltip;" />
                <grid>
                  <columns>
                    <column flex="1" />
                    <column />
                  </columns>
                  <rows>
                    <row align="center">
                      <label value="&foxyproxy.leftclicktb.label;"
                        accesskey="&foxyproxy.leftclicktb.accesskey;"
                        tooltiptext="&foxyproxy.leftclicktb.tooltip;"
                        control="tbLeftClickMenu" />
                      <menulist id="tbLeftClickMenu"
                        oncommand="foxyproxy.toolbar.leftClick=this.value;"
                        tooltiptext="&foxyproxy.leftclicktb.tooltip;"
                        style="width: 15em;" sizetopopup="none">
                        <menupopup>
                          <menuitem label="&foxyproxy.click.options;"
                            value="options" />
                          <menuitem label="&foxyproxy.click.cycle;"
                            value="cycle" />
                          <menuitem
                            label="&foxyproxy.click.contextmenu;"
                            value="contextmenu" />
                          <menuitem
                            label="&foxyproxy.click.removeallcookies;"
                            value="removeallcookies" />
                          <menuitem
                            label="&foxyproxy.click.reloadcurtab;"
                            value="reloadcurtab" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinbrowser;"
                            value="reloadtabsinbrowser" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinallbrowsers;"
                            value="reloadtabsinallbrowsers" />
                          <menuitem label="&foxyproxy.click.toggle;"
                            value="toggle" />
                          <menuitem label="&foxyproxy.quickadd.label;"
                            value="quickadd" />    
                        </menupopup>
                      </menulist>
                    </row>
                    <row align="center">
                      <label value="&foxyproxy.middleclicktb.label;"
                        accesskey="&foxyproxy.middleclicktb.accesskey;"
                        tooltiptext="&foxyproxy.middleclicktb.tooltip;"
                        control="tbMiddleClickMenu" />
                      <menulist id="tbMiddleClickMenu"
                        oncommand="foxyproxy.toolbar.middleClick=this.value;"
                        tooltiptext="&foxyproxy.middleclicktb.tooltip;"
                        style="width: 15em;" sizetopopup="none">
                        <menupopup>
                          <menuitem label="&foxyproxy.click.options;"
                            value="options" />
                          <menuitem label="&foxyproxy.click.cycle;"
                            value="cycle" />
                          <menuitem
                            label="&foxyproxy.click.contextmenu;"
                            value="contextmenu" />
                          <menuitem
                            label="&foxyproxy.click.removeallcookies;"
                            value="removeallcookies" />
                          <menuitem
                            label="&foxyproxy.click.reloadcurtab;"
                            value="reloadcurtab" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinbrowser;"
                            value="reloadtabsinbrowser" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinallbrowsers;"
                            value="reloadtabsinallbrowsers" />
                          <menuitem label="&foxyproxy.click.toggle;"
                            value="toggle" />
                          <menuitem label="&foxyproxy.quickadd.label;"
                            value="quickadd" />                            
                        </menupopup>
                      </menulist>
                    </row>
                    <row align="center">
                      <label value="&foxyproxy.rightclicktb.label;"
                        accesskey="&foxyproxy.rightclicktb.accesskey;"
                        tooltiptext="&foxyproxy.rightclicktb.tooltip;"
                        control="tbRightClickMenu" />
                      <menulist id="tbRightClickMenu"
                        oncommand="foxyproxy.toolbar.rightClick=this.value;"
                        tooltiptext="&foxyproxy.rightclicktb.tooltip;"
                        style="width: 15em;" sizetopopup="none">
                        <menupopup>
                          <menuitem label="&foxyproxy.click.options;"
                            value="options" />
                          <menuitem label="&foxyproxy.click.cycle;"
                            value="cycle" />
                          <menuitem
                            label="&foxyproxy.click.contextmenu;"
                            value="contextmenu" />
                          <menuitem
                            label="&foxyproxy.click.removeallcookies;"
                            value="removeallcookies" />
                          <menuitem
                            label="&foxyproxy.click.reloadcurtab;"
                            value="reloadcurtab" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinbrowser;"
                            value="reloadtabsinbrowser" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinallbrowsers;"
                            value="reloadtabsinallbrowsers" />
                          <menuitem label="&foxyproxy.click.toggle;"
                            value="toggle" />
                          <menuitem label="&foxyproxy.quickadd.label;"
                            value="quickadd" />                            
                        </menupopup>
                      </menulist>
                    </row>
                  </rows>
                </grid>
              </groupbox>
            </row>
            <row>
              <groupbox>
                <caption label="&foxyproxy.misc.label;"
                  tooltiptext="&foxyproxy.misc.tooltip;" />
                <row align="center">
                  <label value="&foxyproxy.storagelocation.label.2;"
                    accesskey="&foxyproxy.storagelocation.accesskey;"
                    tooltiptext="&foxyproxy.storagelocation.tooltip;" />
                  <!-- style to simulate disabled="true" look-and-feel. we don't want to actually
                  use disabled="true" because then the user can't scroll the textbox content, copy it
                  into the clipboard, etc. -->  
                  <textbox id="settingsURL" flex="1" readonly="true" style="border: gray; color: gray"
                    tooltiptext="&foxyproxy.storagelocation.tooltip;" />
                  <button id="settingsURLBtn" style="min-width: 0.5em;"
                    oncommand="onSettingsURLBtn();" label="..."
                    tooltiptext="&foxyproxy.storagelocation.tooltip;" />
                </row>
                <row align="center" observes="notDefaultSettingsBroadcaster">
                    <description>Settings aren't in the default location.
                    <html:a class="link" style="margin: 0 .5em 0 .5em"   
                      onclick="fpc.openAndReuseOneTabPerURL('http://foxyproxy.mozdev.org/settings.html');">&foxyproxy.importantnote.label;</html:a>
                    </description>
                    <button command="resetSettingsCmd" label="&foxyproxy.resetlocation.label;"/>
                </row>
                <row align="center">
                  <checkbox id="dnsEnabled"
                    label="&foxyproxy.proxydns.label;"
                    accesskey="&foxyproxy.proxydns.accesskey;"
                    tooltiptext="&foxyproxy.proxydns.tooltip;"
                    oncommand="foxyproxy.proxyDNS = this.checked;overlay.ask(window, '&foxyproxy.proxydns.notice;') &amp;&amp; foxyproxy.restart();" />
                </row>
                <row align="center">
                  <checkbox id="advancedMenusEnabled"
                    label="&foxyproxy.advancedmenus.label;"
                    accesskey="&foxyproxy.advancedmenus.accesskey;"
                    tooltiptext="&foxyproxy.advancedmenus.tooltip;"
                    oncommand="foxyproxy.advancedMenus = this.checked;" />
                </row>
              </groupbox>
              <groupbox>
                <caption label="&foxyproxy.statusbaractivation.label;"
                  tooltiptext="&foxyproxy.statusbaractivation.tooltip;" />
                <grid>
                  <columns>
                    <column flex="1" />
                    <column />
                  </columns>
                  <rows>
                    <row align="center">
                      <label value="&foxyproxy.leftclicksb.label;"
                        accesskey="&foxyproxy.leftclicksb.accesskey;"
                        tooltiptext="&foxyproxy.leftclicksb.tooltip;"
                        control="sbLeftClickMenu" />
                      <menulist id="sbLeftClickMenu"
                        oncommand="foxyproxy.statusbar.leftClick=this.value;"
                        tooltiptext="&foxyproxy.leftclicksb.tooltip;"
                        style="width: 15em;" sizetopopup="none">
                        <menupopup>
                          <menuitem label="&foxyproxy.click.options;"
                            value="options" />
                          <menuitem label="&foxyproxy.click.cycle;"
                            value="cycle" />
                          <menuitem
                            label="&foxyproxy.click.contextmenu;"
                            value="contextmenu" />
                          <menuitem
                            label="&foxyproxy.click.removeallcookies;"
                            value="removeallcookies" />
                          <menuitem
                            label="&foxyproxy.click.reloadcurtab;"
                            value="reloadcurtab" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinbrowser;"
                            value="reloadtabsinbrowser" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinallbrowsers;"
                            value="reloadtabsinallbrowsers" />
                          <menuitem label="&foxyproxy.click.toggle;"
                            value="toggle" />
                          <menuitem label="&foxyproxy.quickadd.label;"
                            value="quickadd" />                            
                        </menupopup>
                      </menulist>
                    </row>
                    <row align="center">
                      <label value="&foxyproxy.middleclicksb.label;"
                        accesskey="&foxyproxy.middleclicksb.accesskey;"
                        tooltiptext="&foxyproxy.middleclicksb.tooltip;"
                        control="sbMiddleClickMenu" />
                      <menulist id="sbMiddleClickMenu"
                        oncommand="foxyproxy.statusbar.middleClick=this.value;"
                        tooltiptext="&foxyproxy.middleclicksb.tooltip;"
                        style="width: 15em;" sizetopopup="none">
                        <menupopup>
                          <menuitem label="&foxyproxy.click.options;"
                            value="options" />
                          <menuitem label="&foxyproxy.click.cycle;"
                            value="cycle" />
                          <menuitem
                            label="&foxyproxy.click.contextmenu;"
                            value="contextmenu" />
                          <menuitem
                            label="&foxyproxy.click.removeallcookies;"
                            value="removeallcookies" />
                          <menuitem
                            label="&foxyproxy.click.reloadcurtab;"
                            value="reloadcurtab" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinbrowser;"
                            value="reloadtabsinbrowser" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinallbrowsers;"
                            value="reloadtabsinallbrowsers" />
                          <menuitem label="&foxyproxy.click.toggle;"
                            value="toggle" />
                          <menuitem label="&foxyproxy.quickadd.label;"
                            value="quickadd" />                            
                        </menupopup>
                      </menulist>
                    </row>
                    <row align="center">
                      <label value="&foxyproxy.rightclicksb.label;"
                        accesskey="&foxyproxy.rightclicksb.accesskey;"
                        tooltiptext="&foxyproxy.rightclicksb.tooltip;"
                        control="sbRightClickMenu" />
                      <menulist id="sbRightClickMenu"
                        oncommand="foxyproxy.statusbar.rightClick=this.value;"
                        tooltiptext="&foxyproxy.rightclicksb.tooltip;"
                        style="width: 15em;" sizetopopup="none">
                        <menupopup>
                          <menuitem label="&foxyproxy.click.options;"
                            value="options" />
                          <menuitem label="&foxyproxy.click.cycle;"
                            value="cycle" />
                          <menuitem
                            label="&foxyproxy.click.contextmenu;"
                            value="contextmenu" />
                          <menuitem
                            label="&foxyproxy.click.removeallcookies;"
                            value="removeallcookies" />
                          <menuitem
                            label="&foxyproxy.click.reloadcurtab;"
                            value="reloadcurtab" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinbrowser;"
                            value="reloadtabsinbrowser" />
                          <menuitem
                            label="&foxyproxy.click.reloadtabsinallbrowsers;"
                            value="reloadtabsinallbrowsers" />
                          <menuitem label="&foxyproxy.click.toggle;"
                            value="toggle" />
                          <menuitem label="&foxyproxy.quickadd.label;"
                            value="quickadd" />                            
                        </menupopup>
                      </menulist>
                    </row>
                  </rows>
                </grid>
              </groupbox>
            </row>
          </rows>
        </grid>
      </tabpanel>

      <!--<groupbox>
        <caption label="&foxyproxy.random.settings.label;"
        accesskey="&foxyproxy.random.settings.accesskey;"
        tooltiptext="&foxyproxy.random.settings.tooltip;"/>
        <row align="center">
        <checkbox id="randomIncludeDirect"
        label="&foxyproxy.random.includedirect.label;"
        accesskey="&foxyproxy.random.includedirect.accesskey;"
        tooltiptext="&foxyproxy.random.includedirect.tooltip;"
        oncommand="onIncludeDirectInRandom();"/>
        </row>
        <row align="center">
        <checkbox id="randomIncludeDisabled"
        label="&foxyproxy.random.includedisabled.label;"
        accesskey="&foxyproxy.random.includedisabled.accesskey;"
        tooltiptext="&foxyproxy.random.includedisabled.tooltip;"
        oncommand="onIncludeDisabledInRandom();"/>
        </row>
        </groupbox>
        <row><separator class="thin"/></row>-->

      <!-- quickadd tab -->
      <tabpanel flex="1" orient="vertical">
        <description style="width: 1em;">&foxyproxy.quickadd.desc1;
          <text value="&foxyproxy.keyconfig.label;" class="text-link"
            onclick="fpc.openAndReuseOneTabPerURL('http://forums.mozillazine.org/viewtopic.php?t=72994');" />
          &foxyproxy.quickadd.desc2;
        </description>
        <checkbox id="quickAddEnabled" 
          label="&foxyproxy.enabled.label;"
          accesskey="&foxyproxy.enabled.accesskey;"
          tooltiptext="&foxyproxy.enabled.tooltip;"
          oncommand="onQuickAddEnabled(this);"/>
        <groupbox observes="quickAddBroadcaster">
          <grid>
            <columns>
              <column />
              <column />
              <column />
            </columns>
            <rows>
              <row align="center">
                <checkbox id="quickAddReload"
                  label="&foxyproxy.autoadd.reload.label;"
                  accesskey="&foxyproxy.autoadd.reload.accesskey;"
                  tooltiptext="&foxyproxy.autoadd.reload.tooltip;"                  
                  oncommand="foxyproxy.quickadd.reload = this.checked;"/>
                <checkbox id="quickAddNotify"
                  label="&foxyproxy.quickadd.notify.label;"
                  accesskey="&foxyproxy.quickadd.notify.accesskey;"
                  tooltiptext="&foxyproxy.quickadd.notify.tooltip;"
                  oncommand="foxyproxy.quickadd.notify = this.checked;"/>
              </row>
              <row align="center">
                <checkbox id="quickAddPrompt"
                  label="&foxyproxy.quickadd.prompt.label;"
                  accesskey="&foxyproxy.quickadd.prompt.accesskey;"
                  tooltiptext="&foxyproxy.quickadd.prompt.tooltip;"
                  oncommand="foxyproxy.quickadd.prompt = this.checked;"/>
                <checkbox id="quickAddNotifyWhenCanceled"
                  label="&foxyproxy.quickadd.notify.whencanceled.label;"
                  accesskey="&foxyproxy.quickadd.notify.whencanceled.accesskey;"
                  tooltiptext="&foxyproxy.quickadd.notify.whencanceled.tooltip;"
                  oncommand="foxyproxy.quickadd.notifyWhenCanceled = this.checked;"/>
                <toolbarbutton class="foxyproxy-ref"
                  popup="notifyWhenCanceledPopup" tooltiptext="&foxyproxy.whatsthis;" />
              </row>
            </rows>
          </grid>
        </groupbox>
        <groupbox observes="quickAddBroadcaster">
        <grid>
          <columns>
            <column />
            <column flex="1" />
          </columns>
          <rows>
            <row align="center">
              <label value="&foxyproxy.quickadd.proxy.label;"
                tooltiptext="&foxyproxy.quickadd.proxy.tooltip;"
                accesskey="&foxyproxy.quickadd.proxy.accesskey;" />
              <menulist id="quickAddProxyMenu"
                tooltiptext="&foxyproxy.quickadd.proxy.tooltip;"
                oncommand="foxyproxy.quickadd.proxyById = this.value;">
                <menupopup />
              </menulist>
            </row>
          </rows>
        </grid>
        <hbox align="center" observes="quickAddBroadcaster" >
          <label value="&foxyproxy.pattern.to.quickadd.label;" control="qapb"/>
          <button id="qapb" command="quickAddPatternCmd" label="&foxyproxy.define.label;"/>
        </hbox>
      </groupbox>
      </tabpanel>

      <!-- autoadd tab -->
      <tabpanel flex="1" orient="vertical">
        <description style="width: 1em;">
          &foxyproxy.autoadd.description;
        </description>
        <checkbox id="autoAddEnabled" 
          label="&foxyproxy.enabled.label;"
          accesskey="&foxyproxy.enabled.accesskey;"
          tooltiptext="&foxyproxy.enabled.tooltip;"
          oncommand="onAutoAddEnabled(this);"/>
        <groupbox observes="autoAddBroadcaster">
          <grid>
            <columns>
              <column />
              <column />
              <column />
            </columns>
            <rows>
              <row align="center">
                <checkbox id="autoAddReload"
                  label="&foxyproxy.autoadd.reload.label;"
                  accesskey="&foxyproxy.autoadd.reload.accesskey;"
                  tooltiptext="&foxyproxy.autoadd.reload.tooltip;"
                  oncommand="foxyproxy.autoadd.reload = this.checked;"/>
                <checkbox id="autoAddNotify"
                  label="&foxyproxy.autoadd.notify.label;"
                  accesskey="&foxyproxy.autoadd.notify.accesskey;"
                  tooltiptext="&foxyproxy.autoadd.notify.tooltip2;"
                  oncommand="foxyproxy.autoadd.notify = this.checked;"/>
              </row>
              <row align="center">
                <checkbox id="autoAddPrompt"
                  label="&foxyproxy.quickadd.prompt.label;"
                  accesskey="&foxyproxy.quickadd.prompt.accesskey;"
                  tooltiptext="&foxyproxy.quickadd.prompt.tooltip;"
                  oncommand="foxyproxy.autoadd.prompt = this.checked;"/>
              </row>
            </rows>
          </grid>
        </groupbox>
        <groupbox observes="autoAddBroadcaster">
          <grid>
            <columns>
              <column />
              <column flex="1" />
              <column />
            </columns>
            <rows>
              <row align="center">
                <label value="&foxyproxy.autoadd.proxy.label;"
                  tooltiptext="&foxyproxy.autoadd.proxy.tooltip;"
                  accesskey="&foxyproxy.autoadd.proxy.accesskey;" />
              <menulist id="autoAddProxyMenu"
                tooltiptext="&foxyproxy.autoadd.proxy.tooltip;"
                oncommand="foxyproxy.autoadd.proxyById = this.value;">
                <menupopup />
              </menulist>
              <spacer />
              </row>
            </rows>
          </grid>
          <grid>
            <columns><column/><column/></columns><rows>
            <row align="center" observes="autoAddBroadcaster">
              <label value="&foxyproxy.autoadd.pattern.label;" control="bspb"/>
              <button id="bspc" command="blockedPagePatternCmd" label="&foxyproxy.define.label;"/>
            </row>
            <row align="center" observes="autoAddBroadcaster" >
              <label value="&foxyproxy.pattern.to.autoadd.label;" control="aapb"/>
              <button id="aapb" command="autoAddPatternCmd" label="&foxyproxy.define.label;"/>
            </row>
          </rows>
          </grid>
        </groupbox>
      </tabpanel>

      <!-- logging -->
      <tabpanel flex="1" orient="vertical">
        <separator class="thin" />
        <hbox align="center">
          <checkbox id="enableLogging" label="&foxyproxy.enabled.label;"
            accesskey="&foxyproxy.enabled.accesskey;"
            tooltiptext="&foxyproxy.enabled.tooltip;"
            oncommand="foxyproxy.logging=!foxyproxy.logging;" />
          <button command="clearLogCmd" />
          <button command="refreshLogCmd" />
          <button command="saveLogCmd" />
          <spacer flex="1" />
          <text value="&foxyproxy.logging.maxsize.label;"
            accesskey="&foxyproxy.logging.maxsize.accesskey;"
            tooltiptext="&foxyproxy.logging.maxsize.tooltip;"
            control="maxSize" />
          <textbox id="maxSize" size="4"
            accesskey="&foxyproxy.logging.maxsize.accesskey;"
            tooltiptext="&foxyproxy.logging.maxsize.tooltip;" />
          <button command="maxSizeCmd" size="4" />
        </hbox>
        <checkbox command="noURLsCmd" />
        <separator />
        <tree id="logTree" align="stretch" enableColumnDrag="true"
          flex="1" style="width: 5em; height: 2em;" seltype="single">
          <treecols
            pickertooltiptext="&foxyproxy.tree.pickertooltiptext.label;">
            <treecol id="timeCol"
              label="&foxyproxy.tab.logging.timestamp.label;" flex="1"
              persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="urlCol"
              label="&foxyproxy.tab.logging.url.label;" primary="true"
              flex="1" persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="nameCol" label="&foxyproxy.proxy.name.label;"
              flex="1" persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="notesCol" label="&foxyproxy.proxy.notes.label;"
              flex="1" persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="mpNameCol"
              label="&foxyproxy.pattern.name.label;" flex="1"
              persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="mpCol" label="&foxyproxy.pattern.label;"
              flex="1" persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="mpCaseCol"
              label="&foxyproxy.casesensitive.label;" flex="1"
              persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="mpTypeCol"
              label="&foxyproxy.pattern.type.label;" flex="1"
              persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="mpBlackCol"
              label="&foxyproxy.whitelist.blacklist.label;" flex="1"
              persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="pacResult" label="&foxyproxy.pac.result.label;"
              flex="1" persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
            <treecol id="errCol" label="&foxyproxy.error.msg.label;"
              flex="1" persist="width ordinal hidden" />
            <splitter class="tree-splitter" />
          </treecols>
          <treechildren id="logTreeChildren" flex="1"
            context="logTreeMenu" />
        </tree>
      </tabpanel>
    </tabpanels>
  </tabbox>
  <hbox align="center">
    <label value="&foxyproxy.keep.free;:" style="font-weight: bold;"/>
    <button command="donateCmd" style="font-weight: bold;"/>
    <button command="donationListCmd"/>
    <spacer flex="1" />
    <button command="closeCmd" />
  </hbox>
  <separator class="thin" />

  <popupset>
    <popup id="proxyTreeMenu"
      onpopupshowing="onProxyTreeMenuPopupShowing();">
      <menuitem id="enabledPopUpMenuItem" command="toggleEnabledCmd"
        type="checkbox" />
      <menuseparator id="menuSeperator" />
      <menuitem class="menuitem-non-iconic" command="createProxyCmd" />
      <menuseparator />
      <menuitem class="menuitem-non-iconic" command="settingsCmd" />
      <menuitem class="menuitem-non-iconic" command="copySelectionCmd" />
      <menuitem class="menuitem-non-iconic"
        command="deleteSelectionCmd" />
      <menuitem class="menuitem-non-iconic" command="moveUpCmd"
        label="&foxyproxy.moveup.label;" />
      <menuitem class="menuitem-non-iconic" command="moveDownCmd"
        label="&foxyproxy.movedown.label;" />
      <menuseparator />
      <menuitem class="menuitem-non-iconic" command="torWizardCmd" />
      <menuseparator />
      <!-- <menuitem class="menuitem-non-iconic" command="importSettingsCmd"/>
        <menuitem class="menuitem-non-iconic" command="exportSettingsCmd"/>
        <menuitem class="menuitem-non-iconic" command="importListCmd"/>
        <menuseparator/>         -->
      <menuitem class="menuitem-non-iconic" command="helpCmd" />
      <menuitem class="menuitem-non-iconic" command="closeCmd" />
    </popup>

    <popup id="mainPopup">
      <menuitem class="menuitem-non-iconic" command="createProxyCmd" />
      <menuseparator />
      <menuitem class="menuitem-non-iconic" command="torWizardCmd" />
      <menuseparator />
      <menuitem class="menuitem-non-iconic" command="helpCmd" />
      <menuitem class="menuitem-non-iconic" command="closeCmd" />
    </popup>

    <popup id="logTreeMenu">
      <menuitem class="menuitem-non-iconic" command="clearLogCmd" />
      <menuitem class="menuitem-non-iconic" command="refreshLogCmd" />
      <menuitem class="menuitem-non-iconic" command="saveLogCmd" />
    </popup>
  </popupset>

  <command id="clearLogCmd" label="&foxyproxy.clear.label;"
    tooltiptext="&foxyproxy.clear.label;"
    accesskey="&foxyproxy.clear.accesskey;"
    oncommand="foxyproxy.logg.clear();_updateLogView();" />

  <command id="refreshLogCmd" label="&foxyproxy.refresh.label;"
    tooltiptext="&foxyproxy.refresh.tooltip;"
    accesskey="&foxyproxy.refresh.accesskey;"
    oncommand="_updateLogView();" />

  <command id="saveLogCmd" label="&foxyproxy.save.label;"
    tooltiptext="&foxyproxy.save.tooltip;"
    accesskey="&foxyproxy.save.accesskey;"
    oncommand="_updateLogView();saveLog();" />

  <command id="maxSizeCmd"
    label="&foxyproxy.logging.maxsize.button.label;"
    tooltiptext="&foxyproxy.logging.maxsize.button.tooltip;"
    accesskey="&foxyproxy.logging.maxsize.button.accesskey;"
    oncommand="onMaxSize();" />

  <command id="noURLsCmd" label="&foxyproxy.logging.noURLs.label;"
    accesskey="&foxyproxy.logging.noURLs.accesskey;"
    tooltiptext="&foxyproxy.logging.noURLs.tooltip;"
    oncommand="overlay.onToggleNoURLs(window);" />

  <command id="toggleEnabledCmd" label="&foxyproxy.enabled.label;"
    tooltiptext="&foxyproxy.enabled.tooltip;"
    accesskey="&foxyproxy.enabled.accesskey;"
    oncommand="toggleEnabled();" />

  <command id="createProxyCmd" label="&foxyproxy.addnewproxy.label;"
    tooltiptext="&foxyproxy.addnewproxy.tooltip;"
    accesskey="&foxyproxy.addnewproxy.accesskey;"
    oncommand="onSettings(true);" />

  <command id="moveUpCmd" tooltiptext="&foxyproxy.moveup.tooltip;"
    accesskey="&foxyproxy.moveup.accesskey;" oncommand="move('up');"
    disabled="true" />

  <command id="moveDownCmd" tooltiptext="&foxyproxy.movedown.tooltip;"
    accesskey="&foxyproxy.movedown.accesskey;" oncommand="move('down');"
    disabled="true" />

  <command id="copySelectionCmd"
    label="&foxyproxy.copy.selection.label;"
    accesskey="&foxyproxy.copy.selection.accesskey;"
    tooltiptext="&foxyproxy.copy.selection.tooltip;"
    oncommand="onCopySelection(document);" observes="tree-row-selected"
    disabled="true" />

  <command id="deleteSelectionCmd"
    label="&foxyproxy.delete.selection.label;"
    accesskey="&foxyproxy.delete.selection.accesskey;"
    tooltiptext="&foxyproxy.delete.selection.tooltip;"
    oncommand="onDeleteSelection();" observes="tree-row-selected"
    disabled="true" />

  <command id="settingsCmd" label="&foxyproxy.edit.selection.label;"
    accesskey="&foxyproxy.edit.selection.accesskey;"
    tooltiptext="&foxyproxy.edit.selection.tooltip;"
    oncommand="onSettings(false);" observes="tree-row-selected"
    disabled="true" />

  <command id="closeCmd" label="&foxyproxy.close.label;"
    accesskey="&foxyproxy.close.accesskey;"
    tooltiptext="&foxyproxy.close.tooltip;" oncommand="window.close()" />

  <command id="donateCmd" label="&foxyproxy.please.donate.label;"
    accesskey="&foxyproxy.please.donate.accesskey;"
    tooltiptext="&foxyproxy.please.donate.label;" oncommand="fpc.openAndReuseOneTabPerURL('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=63002');" />

  <command id="donationListCmd" label="&foxyproxy.donation.list.label;"
    accesskey="&foxyproxy.donation.list.accesskey;"
    tooltiptext="&foxyproxy.donation.list.label;" oncommand="fpc.openAndReuseOneTabPerURL('http://foxyproxy.mozdev.org/donations.html');" />

  <command id="importSettingsCmd"
    label="&foxyproxy.importsettings.label;"
    accesskey="&foxyproxy.importsettings.accesskey;"
    tooltiptext="&foxyproxy.importsettings.tooltip;"
    oncommand="importSettings();" />

  <command id="exportSettingsCmd"
    label="&foxyproxy.exportsettings.label;"
    accesskey="&foxyproxy.exportsettings.accesskey;"
    tooltiptext="&foxyproxy.exportsettings.tooltip;"
    oncommand="exportSettings();" />

  <command id="importListCmd" label="&foxyproxy.importlist.label;"
    accesskey="&foxyproxy.importlist.accesskey;"
    tooltiptext="&foxyproxy.importlist.tooltip;"
    oncommand="importProxyList();" />

  <command id="aboutCmd" label="&foxyproxy.about.label;"
    accesskey="&foxyproxy.about.accesskey;"
    tooltiptext="&foxyproxy.about.tooltip;"
    oncommand="window.openDialog('chrome://foxyproxy/content/about.xul', '', 'chrome, dialog, resizable=no, modal, centerscreen', {inn:{overlay:overlay}}).focus();" />

  <command id="onlineCmd" label="&foxyproxy.online.label;"
    accesskey="&foxyproxy.online.accesskey;"
    tooltiptext="&foxyproxy.online.tooltip;"
    oncommand="fpc.openAndReuseOneTabPerURL('http://foxyproxy.mozdev.org/');" />

  <command id="helpCmd" label="&foxyproxy.help.label;"
    accesskey="&foxyproxy.help.accesskey;"
    tooltiptext="&foxyproxy.help.tooltip;"
    oncommand="fpc.openAndReuseOneTabPerURL('http://foxyproxy.mozdev.org/help.html');" />

  <command id="torWizardCmd" label="&foxyproxy.tor.label;"
    accesskey="&foxyproxy.tor.accesskey;"
    tooltiptext="&foxyproxy.tor.tooltip;"
    oncommand="overlay.torWizard(false);" />

  <command id="autoAddPatternCmd" label="&foxyproxy.define.label;"
    accesskey="&foxyproxy.define.accesskey;"
    tooltiptext="&foxyproxy.define.tooltip;"
    oncommand="onDefinePattern(foxyproxy.autoadd)"/>

  <command id="blockedPagePatternCmd" label="&foxyproxy.define.label;"
    accesskey="&foxyproxy.define.accesskey;"
    tooltiptext="&foxyproxy.define.tooltip;"
    oncommand="onBlockedPagePattern();"/>
    
  <command id="quickAddPatternCmd" label="&foxyproxy.define.label;"
    accesskey="&foxyproxy.define.accesskey;"
    tooltiptext="&foxyproxy.define.tooltip;"
    oncommand="onDefinePattern(foxyproxy.quickadd)"/>
    
  <command id="resetSettingsCmd" label="&foxyproxy.resetlocation.label;"
    accesskey="&foxyproxy.resetlocation.accesskey;"
    tooltiptext="&foxyproxy.resetlocation.tooltip;"
    oncommand="onResetSettingsURL()"/>
        
  <broadcasterset>
    <broadcaster id="tree-row-selected" disabled="true" />
    <broadcaster id="statusBarWidthBroadcaster" disabled="true" />
    <broadcaster id="autoAddBroadcaster" hidden="true" />
    <broadcaster id="quickAddBroadcaster" hidden="true" />
    <broadcaster id="notDefaultSettingsBroadcaster" hidden="true"/>    
  </broadcasterset>

  <popupset>
    <popup id="notifyWhenCanceledPopup"/>
  </popupset> 

  <keyset>
    <key id="esc-key" keycode="VK_ESCAPE" command="closeCmd" />
  </keyset>
</window>
