<?xml version="1.0"?>
<!-- This Source Code is subject to the terms of the Mozilla Public License
         - version 2.0 (the "License"). You can obtain a copy of the License at
         - http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
<?xml-stylesheet href="chrome://muter/skin/muter.css" type="text/css"?>
<!DOCTYPE prefwindow
[
  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
  %brandDTD;
  <!ENTITY % muterDTD SYSTEM "chrome://muter/locale/muter.dtd">
  %muterDTD;
]>
<prefwindow id="muter-settings"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&muter.settings.title;" onload="muterSettings.init();"
onunload="muterSettings.destory();" buttons="accept, cancel, extra1, extra2"
ondialogaccept="muterSettings.saveSettings();"
ondialogextra1="muterSettings.restoreSettings();"
ondialogextra2="muterSettings.openFeedback();">
  <script type="application/x-javascript"
  src="chrome://muter/content/muterSettings.js" />
  <prefpane id="muter-prefpane1" label="preference">
    <!-- Lists all the preferences to be set here -->
    <preferences>
      <preference id="shortcutKey" name="extensions.firefox-muter.shortcut.key"
      type="string" />
      <preference id="shortcutModifiers"
      name="extensions.firefox-muter.shortcut.modifiers" type="string" />
      <preference id="showInAddonBar"
      name="extensions.firefox-muter.showInAddonBar" type="bool" />
      <preference id="showInStatusBar"
      name="extensions.firefox-muter.showInStatusBar" type="bool" />
      <preference id="switchButtonType"
      name="extensions.firefox-muter.switchButtonType" type="string" />
      <preference id="saveStatus" name="extensions.firefox-muter.saveStatus"
      type="bool" />
      <preference id="defaultDisabledIcon"
      name="extensions.firefox-muter.disabledIcon.default" type="string" />
      <preference id="defaultEnabledIcon"
      name="extensions.firefox-muter.enabledIcon.default" type="string" />       
    </preferences>
    <tabbox>
      <tabs>
        <tab label="&muter.settings.ui.label;" />
        <tab label="&muter.settings.custom.label;" />
        <tab label="&muter.settings.miscellaneous.label;" />
      </tabs>
      <tabpanels>
        <tabpanel>
          <!-- Sets the UI -->
          <vbox>
            <hbox>
              <!-- Addon bar setting. -->
              <vbox id="muter-settings-show-in-addon-bar">
                <checkbox preference="showInAddonBar"
                label="&muter.settings.showInAddonBar;" />
                <image class="muter-shadow-image"
                src="chrome://muter/skin/show-in-addon-bar.png" />
              </vbox>
              <!-- Status bar setting. For SeaMonkey only -->
              <vbox id="muter-settings-show-in-status-bar">
                <checkbox preference="showInStatusBar"
                label="&muter.settings.showInStatusBar;" />
                <image class="muter-shadow-image"
                src="chrome://muter/skin/show-in-status-bar.png" />
              </vbox>
            </hbox>
            <!-- Switch button style -->
            <radiogroup id="muter-settings-switch-button-style"
            preference="switchButtonType">
              <label value="&muter.settings.switchButtonStyle;" />
              <hbox>
                <vbox>
                  <radio label="&muter.settings.switchButtonWithMenu;"
                  value="menu-button" />
                  <image class="muter-shadow-image"
                  src="chrome://muter/locale/switch-button-with-menu.png" />
                </vbox>
                <vbox>
                  <radio label="&muter.settings.switchButtonWithoutMenu;"
                  value="none" />
                  <image class="muter-shadow-image"
                  src="chrome://muter/skin/switch-button-without-menu.png" />
                </vbox>
              </hbox>
            </radiogroup>
          </vbox>
        </tabpanel>
        <tabpanel>
          <groupbox>
            <caption label="&muter.settings.defaultIcons.label;" />
            <vbox class="muter-settings-default-icon-vbox">
              <hbox>
                <image id="muter-settings-default-disabled-icon" class="muter-shadow-image" />
                <label value="&muter.settings.defaultDisabledIcon.label;" />
              </hbox>
              <hbox>
                <button class="muter-settings-icon-button"
                label="&muter.settings.changeIcon;"
                oncommand="muterSettings.changeDisabledIcon();" />
                <button class="muter-settings-icon-button"
                label="&muter.settings.resetIcon;"
                oncommand="muterSettings.resetDisabledIcon();" />
              </hbox>
            </vbox>
            <vbox class="muter-settings-default-icon-vbox">
              <hbox>
                <image id="muter-settings-default-enabled-icon"
                class="muter-shadow-image"/>
                <label value="&muter.settings.defaultEnabledIcon.label;" />
              </hbox>
              <hbox>
                <button class="muter-settings-icon-button"
                label="&muter.settings.changeIcon;"
                oncommand="muterSettings.changeEnabledIcon();" />
                <button class="muter-settings-icon-button"
                label="&muter.settings.resetIcon;"
                oncommand="muterSettings.resetEnabledIcon();" />
              </hbox>
            </vbox>
          </groupbox>
        </tabpanel>
        <tabpanel>
          <vbox>
            <!-- Sets Shortcut key -->
            <groupbox id="muter-settings-shortcut">
              <caption label="&muter.settings.shorcut.title;" />
              <hbox>
                <menulist id="muter-settings-shortcut-modifiers"
                preference="shortcutModifiers">
                  <menupopup>
                    <menuitem value="control" label="Ctrl" />
                    <menuitem value="control shift" label="Ctrl + Shift" />
                    <menuitem value="control alt" label="Ctrl + Alt" />
                    <menuitem value="alt shift" label="Alt + Shift" />
                  </menupopup>
                </menulist>
                <label>+</label>
                <menulist id="muter-settings-shortcut-key"
                preference="shortcutKey">
                  <menupopup>
                    <menuitem value="A" label="A" />
                    <menuitem value="B" label="B" />
                    <menuitem value="C" label="C" />
                    <menuitem value="D" label="D" />
                    <menuitem value="E" label="E" />
                    <menuitem value="F" label="F" />
                    <menuitem value="G" label="G" />
                    <menuitem value="H" label="H" />
                    <menuitem value="I" label="I" />
                    <menuitem value="J" label="J" />
                    <menuitem value="K" label="K" />
                    <menuitem value="L" label="L" />
                    <menuitem value="M" label="M" />
                    <menuitem value="N" label="N" />
                    <menuitem value="O" label="O" />
                    <menuitem value="P" label="P" />
                    <menuitem value="Q" label="Q" />
                    <menuitem value="R" label="R" />
                    <menuitem value="S" label="S" />
                    <menuitem value="T" label="T" />
                    <menuitem value="U" label="U" />
                    <menuitem value="V" label="V" />
                    <menuitem value="W" label="W" />
                    <menuitem value="X" label="X" />
                    <menuitem value="Y" label="Y" />
                    <menuitem value="Z" label="Z" />
                    <menuitem value="0" label="0" />
                    <menuitem value="1" label="1" />
                    <menuitem value="2" label="2" />
                    <menuitem value="3" label="3" />
                    <menuitem value="4" label="4" />
                    <menuitem value="5" label="5" />
                    <menuitem value="6" label="6" />
                    <menuitem value="7" label="7" />
                    <menuitem value="8" label="8" />
                    <menuitem value="9" label="9" />
                  </menupopup>
                </menulist>
              </hbox>
              <hbox>
                <label value="&muter.settings.restart.descr;" />
              </hbox>
            </groupbox>
            <hbox>
              <!-- Save mute status. -->
              <checkbox preference="saveStatus"
              label="&muter.settings.saveStatus;" />
            </hbox>
          </vbox>
        </tabpanel>
      </tabpanels>
    </tabbox>
    <hbox flex="1">
      <button dlgtype="extra1" id="muter-settings-restore"
      label="&muter.settings.restore;" />
      <spacer flex="1" />
      <button dlgtype="accept" id="muter-settings-accept" />
      <button dlgtype="cancel" id="muter-settings-cancel" />
      <button dlgtype="extra2" id="muter-settings-feedback"
      label="&muter.feedback;" />
    </hbox>
  </prefpane>
</prefwindow>
