toolkit/mozapps/downloads/content/download.xml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/downloads/content/download.xml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,327 @@
     1.4 +<?xml version="1.0"?>
     1.5 +
     1.6 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     1.9 +
    1.10 +<!DOCTYPE bindings [
    1.11 +  <!ENTITY % downloadDTD SYSTEM "chrome://mozapps/locale/downloads/downloads.dtd" >
    1.12 +  %downloadDTD;
    1.13 +]>
    1.14 +
    1.15 +<bindings id="downloadBindings"
    1.16 +          xmlns="http://www.mozilla.org/xbl"
    1.17 +          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.18 +          xmlns:xbl="http://www.mozilla.org/xbl">
    1.19 +
    1.20 +  <binding id="download-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
    1.21 +    <resources>
    1.22 +      <stylesheet src="chrome://mozapps/skin/downloads/downloads.css"/>
    1.23 +    </resources>
    1.24 +    <implementation>
    1.25 +      <property name="paused">
    1.26 +        <getter>
    1.27 +        <![CDATA[
    1.28 +          return parseInt(this.getAttribute("state")) == Components.interfaces.nsIDownloadManager.DOWNLOAD_PAUSED;
    1.29 +        ]]>
    1.30 +        </getter>
    1.31 +      </property>
    1.32 +      <property name="openable">
    1.33 +        <getter>
    1.34 +        <![CDATA[
    1.35 +          return parseInt(this.getAttribute("state")) == Components.interfaces.nsIDownloadManager.DOWNLOAD_FINISHED;
    1.36 +        ]]>
    1.37 +        </getter>
    1.38 +      </property>
    1.39 +      <property name="inProgress">
    1.40 +        <getter>
    1.41 +        <![CDATA[
    1.42 +          var state = parseInt(this.getAttribute("state"));
    1.43 +          const dl = Components.interfaces.nsIDownloadManager;
    1.44 +          return state == dl.DOWNLOAD_NOTSTARTED || 
    1.45 +                 state == dl.DOWNLOAD_QUEUED ||
    1.46 +                 state == dl.DOWNLOAD_DOWNLOADING || 
    1.47 +                 state == dl.DOWNLOAD_PAUSED ||
    1.48 +                 state == dl.DOWNLOAD_SCANNING;
    1.49 +        ]]>
    1.50 +        </getter>
    1.51 +      </property>
    1.52 +      <property name="removable">
    1.53 +        <getter>
    1.54 +        <![CDATA[
    1.55 +          var state = parseInt(this.getAttribute("state"));
    1.56 +          const dl = Components.interfaces.nsIDownloadManager;
    1.57 +          return state == dl.DOWNLOAD_FINISHED || 
    1.58 +                 state == dl.DOWNLOAD_CANCELED || 
    1.59 +                 state == dl.DOWNLOAD_BLOCKED_PARENTAL || 
    1.60 +                 state == dl.DOWNLOAD_BLOCKED_POLICY || 
    1.61 +                 state == dl.DOWNLOAD_DIRTY || 
    1.62 +                 state == dl.DOWNLOAD_FAILED;
    1.63 +        ]]>
    1.64 +        </getter>
    1.65 +      </property>
    1.66 +      <property name="buttons">
    1.67 +        <getter>
    1.68 +        <![CDATA[
    1.69 +          var startEl = document.getAnonymousNodes(this);
    1.70 +          if (!startEl.length)
    1.71 +            startEl = [this];
    1.72 +
    1.73 +          const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    1.74 +          return startEl[0].getElementsByTagNameNS(XULNS, "button");
    1.75 +        ]]>
    1.76 +        </getter>
    1.77 +      </property>
    1.78 +    </implementation>
    1.79 +  </binding>
    1.80 +  
    1.81 +  <binding id="download-starting" extends="chrome://mozapps/content/downloads/download.xml#download-base">
    1.82 +    <content>
    1.83 +      <xul:hbox flex="1">
    1.84 +        <xul:vbox pack="center">
    1.85 +          <xul:image class="downloadTypeIcon" validate="always"
    1.86 +                     xbl:inherits="src=image"/>
    1.87 +        </xul:vbox>
    1.88 +        <xul:vbox pack="start" flex="1">
    1.89 +          <xul:label xbl:inherits="value=target,tooltiptext=target"
    1.90 +                     crop="center" class="name"/>
    1.91 +          <xul:progressmeter mode="normal" value="0" flex="1"
    1.92 +                             anonid="progressmeter"/>
    1.93 +          <xul:label value="&starting.label;" class="status"/>
    1.94 +          <xul:spacer flex="1"/>
    1.95 +        </xul:vbox>
    1.96 +        <xul:vbox pack="center">
    1.97 +          <xul:button class="cancel mini-button" tooltiptext="&cmd.cancel.label;"
    1.98 +                      cmd="cmd_cancel" ondblclick="event.stopPropagation();"
    1.99 +                      oncommand="performCommand('cmd_cancel', this);"/>
   1.100 +        </xul:vbox>
   1.101 +      </xul:hbox>
   1.102 +    </content>  
   1.103 +  </binding>
   1.104 +  
   1.105 +  <binding id="download-downloading" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.106 +    <content>
   1.107 +      <xul:hbox flex="1" class="downloadContentBox">
   1.108 +        <xul:vbox pack="center">
   1.109 +          <xul:image class="downloadTypeIcon" validate="always"
   1.110 +                     xbl:inherits="src=image"/>
   1.111 +        </xul:vbox>
   1.112 +        <xul:vbox flex="1">
   1.113 +          <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.114 +                       crop="center" flex="2" class="name"/>
   1.115 +          <xul:hbox>
   1.116 +            <xul:vbox flex="1">
   1.117 +              <xul:progressmeter mode="normal" value="0" flex="1"
   1.118 +                                 anonid="progressmeter"
   1.119 +                                 xbl:inherits="value=progress,mode=progressmode"/>
   1.120 +            </xul:vbox>
   1.121 +            <xul:button class="pause mini-button" tooltiptext="&cmd.pause.label;"
   1.122 +                        cmd="cmd_pause" ondblclick="event.stopPropagation();"
   1.123 +                        oncommand="performCommand('cmd_pause', this);"/>
   1.124 +            <xul:button class="cancel mini-button" tooltiptext="&cmd.cancel.label;"
   1.125 +                        cmd="cmd_cancel" ondblclick="event.stopPropagation();"
   1.126 +                        oncommand="performCommand('cmd_cancel', this);"/>
   1.127 +          </xul:hbox>
   1.128 +          <xul:label xbl:inherits="value=status,tooltiptext=statusTip" flex="1"
   1.129 +                     crop="right" class="status"/>
   1.130 +          <xul:spacer flex="1"/>
   1.131 +        </xul:vbox>
   1.132 +      </xul:hbox>
   1.133 +    </content>
   1.134 +  </binding>
   1.135 +  
   1.136 +  <binding id="download-paused" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.137 +    <content>
   1.138 +      <xul:hbox flex="1">
   1.139 +        <xul:vbox pack="center">
   1.140 +          <xul:image class="downloadTypeIcon" validate="always"
   1.141 +                     xbl:inherits="src=image"/>
   1.142 +        </xul:vbox>
   1.143 +        <xul:vbox flex="1">
   1.144 +          <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.145 +                     crop="center" flex="2" class="name"/>
   1.146 +          <xul:hbox>
   1.147 +            <xul:vbox flex="1">
   1.148 +              <xul:progressmeter mode="normal" value="0" flex="1"
   1.149 +                                 anonid="progressmeter"
   1.150 +                                 xbl:inherits="value=progress,mode=progressmode"/>
   1.151 +            </xul:vbox>
   1.152 +            <xul:button class="resume mini-button" tooltiptext="&cmd.resume.label;"
   1.153 +                        cmd="cmd_resume" ondblclick="event.stopPropagation();"
   1.154 +                        oncommand="performCommand('cmd_resume', this);"/>
   1.155 +            <xul:button class="cancel mini-button" tooltiptext="&cmd.cancel.label;"
   1.156 +                        cmd="cmd_cancel" ondblclick="event.stopPropagation();"
   1.157 +                        oncommand="performCommand('cmd_cancel', this);"/>
   1.158 +          </xul:hbox>
   1.159 +          <xul:label xbl:inherits="value=status,tooltiptext=statusTip" flex="1"
   1.160 +                     crop="right" class="status"/>
   1.161 +          <xul:spacer flex="1"/>
   1.162 +        </xul:vbox>
   1.163 +      </xul:hbox>
   1.164 +    </content>
   1.165 +  </binding>
   1.166 +  
   1.167 +  <binding id="download-done" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.168 +    <content>
   1.169 +      <xul:hbox flex="1">
   1.170 +        <xul:vbox pack="center">
   1.171 +          <xul:image class="downloadTypeIcon" validate="always"
   1.172 +                     xbl:inherits="src=image"/>
   1.173 +        </xul:vbox>
   1.174 +        <xul:vbox pack="start" flex="1">
   1.175 +          <xul:hbox align="center" flex="1">
   1.176 +            <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.177 +                       crop="center" flex="1" class="name"/>
   1.178 +            <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip"
   1.179 +                       class="dateTime"/>
   1.180 +          </xul:hbox>
   1.181 +          <xul:hbox align="center" flex="1">
   1.182 +            <xul:label xbl:inherits="value=status,tooltiptext=statusTip"
   1.183 +                       crop="end" flex="1" class="status"/>
   1.184 +          </xul:hbox>
   1.185 +        </xul:vbox>
   1.186 +      </xul:hbox>
   1.187 +    </content>  
   1.188 +  </binding>
   1.189 +  
   1.190 +  <binding id="download-canceled" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.191 +    <content>
   1.192 +      <xul:hbox flex="1">
   1.193 +        <xul:vbox pack="center">
   1.194 +          <xul:image class="downloadTypeIcon" validate="always"
   1.195 +                     xbl:inherits="src=image"/>
   1.196 +        </xul:vbox>
   1.197 +        <xul:vbox pack="start" flex="1">
   1.198 +          <xul:hbox align="center" flex="1">
   1.199 +            <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.200 +                       crop="center" flex="1" class="name"/>
   1.201 +            <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip"
   1.202 +                       class="dateTime"/>
   1.203 +          </xul:hbox>
   1.204 +          <xul:hbox align="center" flex="1">
   1.205 +            <xul:label xbl:inherits="value=status,tooltiptext=statusTip"
   1.206 +                       crop="end" flex="1" class="status"/>
   1.207 +            <xul:button class="retry mini-button" tooltiptext="&cmd.retry.label;"
   1.208 +                        cmd="cmd_retry" ondblclick="event.stopPropagation();"
   1.209 +                        oncommand="performCommand('cmd_retry', this);"/>
   1.210 +          </xul:hbox>
   1.211 +        </xul:vbox>
   1.212 +      </xul:hbox>
   1.213 +    </content>  
   1.214 +  </binding>
   1.215 +  
   1.216 +  <binding id="download-failed" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.217 +    <content>
   1.218 +      <xul:hbox flex="1">
   1.219 +        <xul:vbox pack="center">
   1.220 +          <xul:image class="downloadTypeIcon" validate="always"
   1.221 +                     xbl:inherits="src=image"/>
   1.222 +        </xul:vbox>
   1.223 +        <xul:vbox pack="start" flex="1">
   1.224 +          <xul:hbox align="center" flex="1">
   1.225 +            <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.226 +                       crop="center" flex="1" class="name"/>
   1.227 +            <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip"
   1.228 +                       class="dateTime"/>
   1.229 +          </xul:hbox>
   1.230 +          <xul:hbox align="center" flex="1">
   1.231 +            <xul:label xbl:inherits="value=status,tooltiptext=statusTip"
   1.232 +                       crop="end" flex="1" class="status"/>
   1.233 +            <xul:button class="retry mini-button" tooltiptext="&cmd.retry.label;"
   1.234 +                        cmd="cmd_retry" ondblclick="event.stopPropagation();"
   1.235 +                        oncommand="performCommand('cmd_retry', this);"/>
   1.236 +          </xul:hbox>
   1.237 +        </xul:vbox>
   1.238 +      </xul:hbox>
   1.239 +    </content>  
   1.240 +  </binding>
   1.241 +
   1.242 +  <binding id="download-blocked-parental" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.243 +    <content>
   1.244 +      <xul:hbox flex="1">
   1.245 +        <xul:vbox pack="center">
   1.246 +          <xul:image class="downloadTypeIcon blockedIcon"/>
   1.247 +        </xul:vbox>
   1.248 +        <xul:vbox pack="start" flex="1">
   1.249 +          <xul:hbox align="center" flex="1">
   1.250 +            <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.251 +                       crop="center" flex="1" class="name"/>
   1.252 +            <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip"
   1.253 +                       class="dateTime"/>
   1.254 +          </xul:hbox>
   1.255 +          <xul:hbox align="center" flex="1">
   1.256 +            <xul:label xbl:inherits="value=status,tooltiptext=statusTip"
   1.257 +                       crop="end" flex="1" class="status"/>
   1.258 +          </xul:hbox>
   1.259 +        </xul:vbox>
   1.260 +      </xul:hbox>
   1.261 +    </content>
   1.262 +  </binding>
   1.263 +
   1.264 +  <binding id="download-blocked-policy" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.265 +    <content>
   1.266 +      <xul:hbox flex="1">
   1.267 +        <xul:vbox pack="center">
   1.268 +          <xul:image class="downloadTypeIcon blockedIcon"/>
   1.269 +        </xul:vbox>
   1.270 +        <xul:vbox pack="start" flex="1">
   1.271 +          <xul:hbox align="center" flex="1">
   1.272 +            <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.273 +                       crop="center" flex="1" class="name"/>
   1.274 +            <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip"
   1.275 +                       class="dateTime"/>
   1.276 +          </xul:hbox>
   1.277 +          <xul:hbox align="center" flex="1">
   1.278 +            <xul:label xbl:inherits="value=status,tooltiptext=statusTip"
   1.279 +                       crop="end" flex="1" class="status"/>
   1.280 +          </xul:hbox>
   1.281 +        </xul:vbox>
   1.282 +      </xul:hbox>
   1.283 +    </content>
   1.284 +  </binding>
   1.285 +
   1.286 +  <binding id="download-scanning" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.287 +    <content>
   1.288 +      <xul:hbox flex="1">
   1.289 +        <xul:vbox pack="center">
   1.290 +          <xul:image class="downloadTypeIcon" validate="always"
   1.291 +                     xbl:inherits="src=image"/>
   1.292 +        </xul:vbox>
   1.293 +        <xul:vbox pack="start" flex="1">
   1.294 +          <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.295 +                       crop="center" flex="2" class="name"/>
   1.296 +          <xul:hbox>
   1.297 +            <xul:vbox flex="1">
   1.298 +              <xul:progressmeter mode="undetermined" flex="1" />
   1.299 +            </xul:vbox>
   1.300 +          </xul:hbox>
   1.301 +          <xul:label value="&scanning.label;" class="status"/>
   1.302 +          <xul:spacer flex="1"/>
   1.303 +        </xul:vbox>
   1.304 +      </xul:hbox>
   1.305 +    </content>  
   1.306 +  </binding>
   1.307 +
   1.308 +  <binding id="download-dirty" extends="chrome://mozapps/content/downloads/download.xml#download-base">
   1.309 +    <content>
   1.310 +      <xul:hbox flex="1">
   1.311 +        <xul:vbox pack="center">
   1.312 +          <xul:image class="downloadTypeIcon blockedIcon"/>
   1.313 +        </xul:vbox>
   1.314 +        <xul:vbox pack="start" flex="1">
   1.315 +          <xul:hbox align="center" flex="1">
   1.316 +            <xul:label xbl:inherits="value=target,tooltiptext=target"
   1.317 +                       crop="center" flex="1" class="name"/>
   1.318 +            <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip"
   1.319 +                       class="dateTime"/>
   1.320 +          </xul:hbox>
   1.321 +          <xul:hbox align="center" flex="1">
   1.322 +            <xul:label xbl:inherits="value=status,tooltiptext=statusTip"
   1.323 +                       crop="end" flex="1" class="status"/>
   1.324 +          </xul:hbox>
   1.325 +        </xul:vbox>
   1.326 +      </xul:hbox>
   1.327 +    </content>
   1.328 +  </binding>
   1.329 +
   1.330 +</bindings>

mercurial