summaryrefslogtreecommitdiff
path: root/application/basilisk/components/downloads/content/downloadsOverlay.xul
blob: 702244ddf0f60c73bf174768a5a354b333740f64 (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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0"?>
# -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# vim: set ts=2 et sw=2 tw=80:
# 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/.

<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
<?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>

<!DOCTYPE overlay SYSTEM "chrome://browser/locale/downloads/downloads.dtd">

<overlay xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         id="downloadsOverlay">

  <commandset>
    <command id="downloadsCmd_doDefault"
             oncommand="goDoCommand('downloadsCmd_doDefault')"/>
    <command id="downloadsCmd_pauseResume"
             oncommand="goDoCommand('downloadsCmd_pauseResume')"/>
    <command id="downloadsCmd_cancel"
             oncommand="goDoCommand('downloadsCmd_cancel')"/>
    <command id="downloadsCmd_unblock"
             oncommand="goDoCommand('downloadsCmd_unblock')"/>
    <command id="downloadsCmd_chooseUnblock"
             oncommand="goDoCommand('downloadsCmd_chooseUnblock')"/>
    <command id="downloadsCmd_unblockAndOpen"
             oncommand="goDoCommand('downloadsCmd_unblockAndOpen')"/>
    <command id="downloadsCmd_confirmBlock"
             oncommand="goDoCommand('downloadsCmd_confirmBlock')"/>
    <command id="downloadsCmd_open"
             oncommand="goDoCommand('downloadsCmd_open')"/>
    <command id="downloadsCmd_show"
             oncommand="goDoCommand('downloadsCmd_show')"/>
    <command id="downloadsCmd_retry"
             oncommand="goDoCommand('downloadsCmd_retry')"/>
    <command id="downloadsCmd_openReferrer"
             oncommand="goDoCommand('downloadsCmd_openReferrer')"/>
    <command id="downloadsCmd_copyLocation"
             oncommand="goDoCommand('downloadsCmd_copyLocation')"/>
    <command id="downloadsCmd_clearList"
             oncommand="goDoCommand('downloadsCmd_clearList')"/>
  </commandset>

  <popupset id="mainPopupSet">
    <!-- The panel has level="top" to ensure that it is never hidden by the
         taskbar on Windows.  See bug 672365.  For accessibility to screen
         readers, we use a label on the panel instead of the anchor because the
         panel can also be displayed without an anchor. -->
    <panel id="downloadsPanel"
           aria-label="&downloads.title;"
           role="group"
           type="arrow"
           orient="vertical"
           level="top"
           onpopupshown="DownloadsPanel.onPopupShown(event);"
           onpopuphidden="DownloadsPanel.onPopupHidden(event);">
      <!-- The following popup menu should be a child of the panel element,
           otherwise flickering may occur when the cursor is moved over the area
           of a disabled menu item that overlaps the panel.  See bug 492960. -->
      <menupopup id="downloadsContextMenu"
                 onpopupshown="DownloadsView.onContextPopupShown(event);"
                 onpopuphidden="DownloadsView.onContextPopupHidden(event);"
                 class="download-state">
        <menuitem command="downloadsCmd_pauseResume"
                  class="downloadPauseMenuItem"
                  label="&cmd.pause.label;"
                  accesskey="&cmd.pause.accesskey;"/>
        <menuitem command="downloadsCmd_pauseResume"
                  class="downloadResumeMenuItem"
                  label="&cmd.resume.label;"
                  accesskey="&cmd.resume.accesskey;"/>
        <menuitem command="downloadsCmd_unblock"
                  class="downloadUnblockMenuItem"
                  label="&cmd.unblock2.label;"
                  accesskey="&cmd.unblock2.accesskey;"/>
        <menuitem command="downloadsCmd_show"
                  class="downloadShowMenuItem"
#ifdef XP_MACOSX
                  label="&cmd.showMac.label;"
                  accesskey="&cmd.showMac.accesskey;"
#else
                  label="&cmd.show.label;"
                  accesskey="&cmd.show.accesskey;"
#endif
                  />

        <menuseparator class="downloadCommandsSeparator"/>

        <menuitem command="downloadsCmd_openReferrer"
                  label="&cmd.goToDownloadPage.label;"
                  accesskey="&cmd.goToDownloadPage.accesskey;"/>
        <menuitem command="downloadsCmd_copyLocation"
                  label="&cmd.copyDownloadLink.label;"
                  accesskey="&cmd.copyDownloadLink.accesskey;"/>

        <menuseparator/>

        <menuitem command="cmd_delete"
                  class="downloadRemoveFromHistoryMenuItem"
                  label="&cmd.removeFromHistory.label;"
                  accesskey="&cmd.removeFromHistory.accesskey;"/>
        <menuitem command="downloadsCmd_clearList"
                  label="&cmd.clearList2.label;"
                  accesskey="&cmd.clearList2.accesskey;"/>
      </menupopup>

      <panelmultiview id="downloadsPanel-multiView"
                      mainViewId="downloadsPanel-mainView"
                      align="stretch">

        <panelview id="downloadsPanel-mainView"
                   flex="1"
                   align="stretch">
          <richlistbox id="downloadsListBox"
                       context="downloadsContextMenu"
                       onmouseover="DownloadsView.onDownloadMouseOver(event);"
                       onmouseout="DownloadsView.onDownloadMouseOut(event);"
                       oncontextmenu="DownloadsView.onDownloadContextMenu(event);"
                       ondragstart="DownloadsView.onDownloadDragStart(event);"/>
          <description id="emptyDownloads"
                       mousethrough="always">
             &downloadsPanelEmpty.label;
          </description>
          <spacer flex="1"/>
          <vbox id="downloadsFooter"
                class="downloadsPanelFooter">
            <stack>
              <hbox id="downloadsSummary"
                    align="center"
                    orient="horizontal"
                    onkeydown="DownloadsSummary.onKeyDown(event);"
                    onclick="DownloadsSummary.onClick(event);">
                <image class="downloadTypeIcon" />
                <vbox pack="center"
                      class="downloadContainer"
                      style="width: &downloadDetails.width;">
                  <description id="downloadsSummaryDescription"
                               style="min-width: &downloadsSummary.minWidth2;"/>
                  <progressmeter id="downloadsSummaryProgress"
                                 class="downloadProgress"
                                 min="0"
                                 max="100"
                                 mode="normal" />
                  <description id="downloadsSummaryDetails"
                               crop="end"/>
                </vbox>
              </hbox>
              <hbox id="downloadsFooterButtons">
                <button id="downloadsHistory"
                        class="downloadsPanelFooterButton"
                        label="&downloadsHistory.label;"
                        accesskey="&downloadsHistory.accesskey;"
                        flex="1"
                        oncommand="DownloadsPanel.showDownloadsHistory();"/>
                <toolbarseparator id="downloadsFooterButtonsSplitter"
                        class="downloadsDropmarkerSplitter"/>
                <button id="downloadsFooterDropmarker"
                        class="downloadsPanelFooterButton downloadsDropmarker"
                        type="menu">
                  <menupopup id="downloadSubPanel"
                             onpopupshowing="DownloadsPanel.onFooterPopupShowing(event);"
                             onpopuphidden="DownloadsPanel.onFooterPopupHidden(event);"
                             position="after_end">
                    <menuitem id="downloadsDropdownItemClearList"
                              command="downloadsCmd_clearList"
                              label="&cmd.clearList2.label;"/>
                    <menuitem id="downloadsDropdownItemOpenDownloadsFolder"
                              oncommand="DownloadsPanel.openDownloadsFolder();"
                              label="&openDownloadsFolder.label;"/>
                  </menupopup>
                </button>
              </hbox>
            </stack>
          </vbox>
        </panelview>

        <panelview id="downloadsPanel-blockedSubview"
                   orient="vertical"
                   flex="1">
          <description id="downloadsPanel-blockedSubview-title"/>
          <description id="downloadsPanel-blockedSubview-details1"/>
          <description id="downloadsPanel-blockedSubview-details2"/>
          <spacer flex="1"/>
          <hbox id="downloadsPanel-blockedSubview-buttons"
                class="downloadsPanelFooter"
                align="stretch">
            <button id="downloadsPanel-blockedSubview-openButton"
                    class="downloadsPanelFooterButton"
                    command="downloadsCmd_unblockAndOpen"
                    flex="1"/>
            <toolbarseparator/>
            <button id="downloadsPanel-blockedSubview-deleteButton"
                    class="downloadsPanelFooterButton"
                    oncommand="DownloadsBlockedSubview.confirmBlock();"
                    default="true"
                    flex="1"/>
          </hbox>
        </panelview>

      </panelmultiview>

    </panel>
  </popupset>
</overlay>