<?xml version="1.0"?>
<?xml-stylesheet href="chrome://testpilot/content/browser.css" type="text/css"?>

<!DOCTYPE overlay [
  <!ENTITY % testpilotDTD SYSTEM "chrome://testpilot/locale/main.dtd">
    %testpilotDTD;
]>

<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<menupopup id="menu_ToolsPopup">
  <menu id="pilot-menu" insertafter="menu_openAddons" />
</menupopup>

<menu id="pilot-menu" class="menu-iconic" label="&testpilot.brand.label;"
      insertafter="addonsManager"
      image="chrome://testpilot/skin/testpilot_16x16.png">
  <menupopup id="pilot-menu-popup"
             onpopuphiding="TestPilotMenuUtils.onPopupHiding(event);">
    <menu id="pilot-notification-settings" label="&testpilot.settings.label;">
      <menupopup onpopupshowing="TestPilotMenuUtils.updateSubmenu();">
        <menuitem class="pilot-notify-me-when"
                  label="&testpilot.settings.notifyWhen.label;"
                  disabled="true"/>
        <menuitem id="pilot-menu-notify-finished"
                  label="&testpilot.settings.readyToSubmit.label;"
                  type="checkbox"
                  oncommand="
                    TestPilotMenuUtils.togglePref('popup.showOnStudyFinished');"/>
        <menuitem id="pilot-menu-notify-new"
                  label="&testpilot.settings.newStudy.label;" type="checkbox"
                  oncommand="
                    TestPilotMenuUtils.togglePref('popup.showOnNewStudy');"/>
        <menuitem id="pilot-menu-notify-results"
                  label="&testpilot.settings.hasNewResults.label;"
                  type="checkbox"
                  oncommand="
                    TestPilotMenuUtils.togglePref('popup.showOnNewResults');"/>
        <menuseparator />
        <menuitem id="pilot-menu-always-submit-data"
                  label="&testpilot.settings.alwaysSubmitData.label;"
                  type="checkbox"
                  oncommand="
                    TestPilotMenuUtils.togglePref('alwaysSubmitData');"/>
      </menupopup>
    </menu>
    <menuitem label="&testpilot.allYourStudies.label;"
              oncommand="TestPilotWindowUtils.openAllStudiesWindow();"/>
    <menuitem label="&testpilot.about.label;"
              oncommand="TestPilotWindowUtils.openHomepage();"/>
  </menupopup>
</menu>

<statusbar id="status-bar">
  <statusbarpanel id="pilot-notifications-button"
                  class="statusbarpanel-iconic"
                  insertbefore="security-button"
                  onmousedown="
                    event.preventDefault();
                    TestPilotMenuUtils.onMenuButtonMouseDown();"
                  image="chrome://testpilot/skin/testpilot_16x16.png"/>

  <panel id="pilot-notification-popup" hidden="true" noautofocus="true"
    level="parent" position="after_start">
    <vbox class="pilot-notification-popup-container">
      <hbox class="pilot-notification-toprow">
        <image id="pilot-notification-icon" />
        <vbox pack="center">
          <label id="pilot-notification-title" class="pilot-title" />
        </vbox>
        <spacer flex="1" />
        <vbox pack="start">
          <image id="pilot-notification-close"
            tooltiptext="&testpilot.notification.close.tooltip;" />
        </vbox>
      </hbox>
      <description id="pilot-notification-text" />
      <hbox align="right"><label id="pilot-notification-link" /></hbox>
      <hbox>
        <checkbox id="pilot-notification-always-submit-checkbox"
          label="&testpilot.settings.alwaysSubmitData.label;" />
        <spacer flex="1" />
      </hbox>
      <hbox align="right">
        <button id="pilot-notification-submit" />
      </hbox>
    </vbox>
  </panel>
</statusbar>
</overlay>
