<?xml version="1.0"?>

<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % generalDTD SYSTEM "chrome://messenger/locale/preferences/general.dtd" >
%generalDTD;
]>

<overlay id="GeneralPaneOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <prefpane id="paneGeneral" onpaneload="gGeneralPane.init();">
    <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>
    <script type="application/javascript" src="chrome://messenger/content/preferences/general.js"/>

    <preferences id="generalPreferences">
      <preference id="mail.pane_config.dynamic" name="mail.pane_config.dynamic" type="int"/>
      <preference id="mailnews.reuse_message_window" name="mailnews.reuse_message_window" type="bool"/>
      <preference id="mailnews.start_page.enabled" name="mailnews.start_page.enabled" type="bool"/>
      <preference id="mailnews.start_page.url" name="mailnews.start_page.url" type="string"/>
      <preference id="mail.biff.show_alert" name="mail.biff.show_alert" type="bool"/>
      <preference id="mail.biff.show_tray_icon" name="mail.biff.show_tray_icon" type="bool" />
      <preference id="mail.biff.play_sound" name="mail.biff.play_sound" type="bool"/>
      <preference id="mail.biff.play_sound.type" name="mail.biff.play_sound.type" type="int"/>
      <preference id="mail.biff.play_sound.url" name="mail.biff.play_sound.url" type="string"/>
    </preferences>

    <stringbundle id="bundlePreferences" src="chrome://messenger/locale/preferences/preferences.properties"/>

    <groupbox>
      <caption label="&messengerStartPage.label;"/>
        <hbox align="start">
          <checkbox id="mailnewsStartPageEnabled" label="&enableStartPage.label;"
                    preference="mailnews.start_page.enabled"
                    accesskey="&enableStartPage.accesskey;"
                    oncommand="gGeneralPane.updateStartPage();"/>
        </hbox>
        <hbox align="center">
          <label value="&location.label;" accesskey="&location1.accesskey;" control="mailnewsStartPageUrl"/>
          <textbox id="mailnewsStartPageUrl" flex="1" class="uri-element"
                   preference="mailnews.start_page.url"
                   onsyncfrompreference="return gGeneralPane.readStartPageUrl();"
                   onsynctopreference="return gGeneralPane.writeStartPageUrl();"/>
          <button label="&useDefault.label;" accesskey="&useDefault.accesskey;"
                  oncommand="gGeneralPane.restoreDefaultStartPage();">
            <observes element="mailnewsStartPageUrl" attribute="disabled"/>
          </button>
        </hbox>
    </groupbox>

    <groupbox>
      <caption label="&defaultSearchEngine.label;"/>
      <hbox>
        <menulist id="defaultWebSearch">
          <menupopup id="defaultWebSearchPopup"/>
        </menulist>
      </hbox>
    </groupbox>

    <groupbox>
      <caption label="&newMessagesArrive.label;"/>
      <hbox align="center">
        <description flex="1">&changeDockIconOptions.label;</description>
        <button id="dockOptions" label="&dockOptions.label;"
                accesskey="&dockOptions.accesskey;"
                oncommand="gGeneralPane.configureDockOptions();"/>
      </hbox>
      <hbox>
        <checkbox id="newMailNotificationAlert"
                  label="&showAnimatedAlert.label;"
                  preference="mail.biff.show_alert"
                  accesskey="&showAnimatedAlert.accesskey;"/>
      </hbox>
      <hbox align="center">
        <checkbox id="newMailNotification" accesskey="&playSound1.accesskey;"
                  preference="mail.biff.play_sound" label="&playSound.label;"
                  oncommand="gGeneralPane.updatePlaySound();"/>
        <spacer flex="1"/>
        <button id="playSound" label="&play.label;" accesskey="&play.accesskey;" oncommand="gGeneralPane.previewSound();"/>
      </hbox>
      <radiogroup id="soundType"
                  class="indent"
                  preference="mail.biff.play_sound.type"
                  orient="vertical"
                  oncommand="gGeneralPane.updatePlaySound();"
                  aria-labelledby="newMailNotification">
        <hbox>
          <radio id="system"
                 value="0"
                 label="&systemsoundMac.label;"
                 accesskey="&systemsoundMac.accesskey;"/>
          <spacer flex="1"/>
        </hbox>
        <hbox>
          <radio id="custom"
                 value="1"
                 label="&customsound.label;"
                 accesskey="&customsound.accesskey;"/>
          <spacer flex="1"/>
        </hbox>
        <hbox>
          <filefield id="soundUrlLocation"
                     class="indent"
                     preference="mail.biff.play_sound.url"
                     preference-editable="true"
                     onsyncfrompreference="return gGeneralPane.readSoundLocation();"
                     aria-labelledby="custom"
                     flex="1"/>
          <button id="browseForSound"
                  label="&browse.label;"
                  accesskey="&browse.accesskey;"
                  oncommand="gGeneralPane.browseForSoundFile();">
            <observes element="soundUrlLocation" attribute="disabled"/>
          </button>
        </hbox>
      </radiogroup>
    </groupbox>
  </prefpane>
</overlay>
