summaryrefslogtreecommitdiffstats
path: root/comm/suite/components/pref/content/pref-download.xul
blob: e3f626204cd4a9579fff0baeded7c86f378e84d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?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 % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % prefDownloadDTD SYSTEM "chrome://communicator/locale/pref/pref-download.dtd">
%prefDownloadDTD;
]>

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

    <preferences>
      <preference id="browser.download.manager.behavior"
                  name="browser.download.manager.behavior"
                  type="int"/>
      <preference id="browser.download.manager.focusWhenStarting"
                  name="browser.download.manager.focusWhenStarting"
                  type="bool" inverted="true"/>
      <preference id="browser.download.useDownloadDir"
                  name="browser.download.useDownloadDir"
                  type="bool"/>
      <preference id="browser.download.dir"
                  name="browser.download.dir"
                  type="file"/>
      <preference id="browser.download.folderList"
                  name="browser.download.folderList"
                  type="int"
                  onchange="displayDownloadDirPref();"/>
      <preference id="browser.download.finished_download_sound"
                  name="browser.download.finished_download_sound"
                  type="bool"
                  onchange="setSoundEnabled(this.value);"/>
      <preference id="browser.download.finished_sound_url"
                  name="browser.download.finished_sound_url"
                  type="string"/>
    </preferences>

    <groupbox>
      <caption label="&downloadBehavior.label;"/>
      <radiogroup id="downloadBehavior"
                  preference="browser.download.manager.behavior">
        <radio value="2"
               label="&doNothing.label;"
               accesskey="&doNothing.accesskey;"/>
        <radio value="1"
               label="&openProgressDialog.label;"
               accesskey="&openProgressDialog.accesskey;"/>
        <radio value="0"
               label="&openDM.label;"
               accesskey="&openDM.accesskey;"/>
      </radiogroup>
      <checkbox id="focusWhenStarting"
                class="indent"
                preference="browser.download.manager.focusWhenStarting"
                label="&flashWhenOpen.label;"
                accesskey="&flashWhenOpen.accesskey;"/>
    </groupbox>

    <groupbox>
      <caption label="&downloadLocation.label;"/>
      <radiogroup id="saveWhere"
                  preference="browser.download.useDownloadDir"
                  onsyncfrompreference="return document.getElementById('download_pane').readUseDownloadDir();">
        <hbox id="saveToRow">
          <radio id="saveTo" value="true"
                 label="&saveTo.label;"
                 accesskey="&saveTo.accesskey;"
                 aria-labelledby="saveTo downloadFolder"/>
          <filefield id="downloadFolder" flex="1"
                     preference="browser.download.dir"
                     preference-editable="true"
                     aria-labelledby="saveTo"
                     onsyncfrompreference="document.getElementById('download_pane').displayDownloadDirPref();"/>
          <button id="chooseFolder" oncommand="chooseFolder();"
                  label="&chooseDownloadFolder.label;"
                  accesskey="&chooseDownloadFolder.accesskey;"/>
        </hbox>
        <radio id="alwaysAsk" value="false"
               label="&alwaysAsk.label;"
               accesskey="&alwaysAsk.accesskey;"/>
      </radiogroup>
    </groupbox>

    <groupbox>
      <caption label="&finishedBehavior.label;"/>
      <hbox align="center">
        <checkbox id="finishedNotificationSound"
                  label="&playSound.label;"
                  preference="browser.download.finished_download_sound"
                  accesskey="&playSound.accesskey;"/>
      </hbox>

      <hbox align="center" class="indent">
        <filefield id="downloadSndURL"
                   flex="1"
                   preference="browser.download.finished_sound_url"
                   preference-editable="true"
                   onsyncfrompreference="return WriteSoundField(this, document.getElementById('download_pane').gSoundUrlPref.value);"/>
        <hbox align="center">
          <button id="downloadSndBrowse"
                  label="&browse.label;"
                  accesskey="&browse.accesskey;"
                  oncommand="SelectSound(gSoundUrlPref);">
            <observes element="downloadSndURL" attribute="disabled"/>
          </button>
          <button id="downloadSndPlay"
                  label="&playButton.label;"
                  accesskey="&playButton.accesskey;"
                  oncommand="PlaySound(gSoundUrlPref.value, false);"/>
        </hbox>
      </hbox>
    </groupbox>
  </prefpane>
</overlay>