<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this file,
   - You can obtain one at http://mozilla.org/MPL/2.0/.  -->

<!DOCTYPE overlay [
  <!ENTITY % prefOfflineCacheDTD SYSTEM "chrome://communicator/locale/pref/pref-offlineapps.dtd">
  %prefOfflineCacheDTD;
]>

<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <prefpane id="offlineapps_pane"
            label="&pref.offlineapps.title;"
            script="chrome://communicator/content/pref/pref-offlineapps.js">

    <preferences>
      <preference id="offline-apps.allow_by_default"
                  name="offline-apps.allow_by_default"
                  type="bool"
                  onchange="UpdateNotifyBox(this.value);"/>
      <preference id="browser.offline-apps.notify"
                  name="browser.offline-apps.notify"
                  type="bool"/>
    </preferences>

    <groupbox id="offlineGroup" flex="1">
      <caption label="&pref.offlineCache.caption;"/>

      <hbox align="center">
        <label id="offlineAppSizeInfo" flex="1"/>
        <button id="clearOfflineAppCache"
                icon="clear"
                label="&clearOfflineAppCache.label;"
                accesskey="&clearOfflineAppCache.accesskey;"
                oncommand="ClearOfflineAppCache();"/>
      </hbox>
      <radiogroup id="offlineDefault"
                  preference="offline-apps.allow_by_default">
        <radio id="offlineAlwaysAllow"
               value="true"
               label="&offlineAlwaysAllow.label;"
               accesskey="&offlineAlwaysAllow.accesskey;"/>
        <hbox align="center">
          <radio id="offlineExplicit"
                 flex="1"
                 value="false"
                 label="&offlineExplicit.label;"
                 accesskey="&offlineExplicit.accesskey;"/>
          <button id="offlineNotifyPermissions"
                  label="&offlineNotifyPermissions.label;"
                  accesskey="&offlineNotifyPermissions.accesskey;"
                  oncommand="toPermissionsManager('offline-app');"/>
        </hbox>
      </radiogroup>
      <checkbox id="offlineNotifyAsk"
                class="indent"
                label="&offlineNotifyAsk.label;"
                accesskey="&offlineNotifyAsk.accesskey;"
                preference="browser.offline-apps.notify"/>
      <separator class="thin"/>
      <hbox flex="1">
        <vbox flex="1">
          <label id="offlineAppsListLabel">&offlineAppsUsage.label;</label>
          <listbox id="offlineAppsList"
                   flex="1"
                   aria-labelledby="offlineAppsListLabel"
                   onselect="OfflineAppSelected(this);">
          </listbox>
        </vbox>
        <vbox pack="end">
          <button id="offlineAppsListRemove"
                  disabled="true"
                  label="&offlineAppsListRemove.label;"
                  accesskey="&offlineAppsListRemove.accesskey;"
                  oncommand="RemoveOfflineApp();"/>
        </vbox>
      </hbox>
    </groupbox>

  </prefpane>
</overlay>
