Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- --> |
michael@0 | 3 | <!-- vim: set ts=2 et sw=2 tw=80: --> |
michael@0 | 4 | |
michael@0 | 5 | <!-- This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 6 | - License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 7 | - You can obtain one at http://mozilla.org/MPL/2.0/. --> |
michael@0 | 8 | |
michael@0 | 9 | <!DOCTYPE bindings SYSTEM "chrome://browser/locale/downloads/downloads.dtd"> |
michael@0 | 10 | |
michael@0 | 11 | <bindings id="downloadBindings" |
michael@0 | 12 | xmlns="http://www.mozilla.org/xbl" |
michael@0 | 13 | xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 14 | xmlns:xbl="http://www.mozilla.org/xbl"> |
michael@0 | 15 | |
michael@0 | 16 | <binding id="download" |
michael@0 | 17 | extends="chrome://global/content/bindings/richlistbox.xml#richlistitem"> |
michael@0 | 18 | <content orient="horizontal" |
michael@0 | 19 | align="center" |
michael@0 | 20 | onclick="DownloadsView.onDownloadClick(event);"> |
michael@0 | 21 | <xul:image class="downloadTypeIcon" |
michael@0 | 22 | validate="always" |
michael@0 | 23 | xbl:inherits="src=image"/> |
michael@0 | 24 | <xul:image class="downloadTypeIcon blockedIcon"/> |
michael@0 | 25 | <xul:vbox pack="center" |
michael@0 | 26 | flex="1" |
michael@0 | 27 | class="downloadContainer" |
michael@0 | 28 | style="width: &downloadDetails.width;"> |
michael@0 | 29 | <!-- We're letting localizers put a min-width in here primarily |
michael@0 | 30 | because of the downloads summary at the bottom of the list of |
michael@0 | 31 | download items. An element in the summary has the same min-width |
michael@0 | 32 | on a description, and we don't want the panel to change size if the |
michael@0 | 33 | summary isn't being displayed, so we ensure that items share the |
michael@0 | 34 | same minimum width. |
michael@0 | 35 | --> |
michael@0 | 36 | <xul:description class="downloadTarget" |
michael@0 | 37 | crop="center" |
michael@0 | 38 | style="min-width: &downloadsSummary.minWidth2;" |
michael@0 | 39 | xbl:inherits="value=target,tooltiptext=target"/> |
michael@0 | 40 | <xul:progressmeter anonid="progressmeter" |
michael@0 | 41 | class="downloadProgress" |
michael@0 | 42 | min="0" |
michael@0 | 43 | max="100" |
michael@0 | 44 | xbl:inherits="mode=progressmode,value=progress"/> |
michael@0 | 45 | <xul:description class="downloadDetails" |
michael@0 | 46 | crop="end" |
michael@0 | 47 | xbl:inherits="value=status,tooltiptext=statusTip"/> |
michael@0 | 48 | </xul:vbox> |
michael@0 | 49 | <xul:stack> |
michael@0 | 50 | <xul:button class="downloadButton downloadCancel" |
michael@0 | 51 | tooltiptext="&cmd.cancel.label;" |
michael@0 | 52 | oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_cancel');"/> |
michael@0 | 53 | <xul:button class="downloadButton downloadRetry" |
michael@0 | 54 | tooltiptext="&cmd.retry.label;" |
michael@0 | 55 | oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_retry');"/> |
michael@0 | 56 | <xul:button class="downloadButton downloadShow" |
michael@0 | 57 | #ifdef XP_MACOSX |
michael@0 | 58 | tooltiptext="&cmd.showMac.label;" |
michael@0 | 59 | #else |
michael@0 | 60 | tooltiptext="&cmd.show.label;" |
michael@0 | 61 | #endif |
michael@0 | 62 | oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_show');"/> |
michael@0 | 63 | </xul:stack> |
michael@0 | 64 | </content> |
michael@0 | 65 | </binding> |
michael@0 | 66 | |
michael@0 | 67 | <binding id="download-full-ui" |
michael@0 | 68 | extends="chrome://global/content/bindings/richlistbox.xml#richlistitem"> |
michael@0 | 69 | <resources> |
michael@0 | 70 | <stylesheet src="chrome://browser/content/downloads/download.css"/> |
michael@0 | 71 | </resources> |
michael@0 | 72 | |
michael@0 | 73 | <content orient="horizontal" align="center"> |
michael@0 | 74 | <xul:image class="downloadTypeIcon" |
michael@0 | 75 | validate="always" |
michael@0 | 76 | xbl:inherits="src=image"/> |
michael@0 | 77 | <xul:image class="downloadTypeIcon blockedIcon"/> |
michael@0 | 78 | <xul:vbox pack="center" flex="1"> |
michael@0 | 79 | <xul:description class="downloadTarget" |
michael@0 | 80 | crop="center" |
michael@0 | 81 | xbl:inherits="value=displayName,tooltiptext=displayName"/> |
michael@0 | 82 | <xul:progressmeter anonid="progressmeter" |
michael@0 | 83 | class="downloadProgress" |
michael@0 | 84 | min="0" |
michael@0 | 85 | max="100" |
michael@0 | 86 | xbl:inherits="mode=progressmode,value=progress"/> |
michael@0 | 87 | <xul:description class="downloadDetails" |
michael@0 | 88 | style="width: &downloadDetails.width;" |
michael@0 | 89 | crop="end" |
michael@0 | 90 | xbl:inherits="value=status,tooltiptext=statusTip"/> |
michael@0 | 91 | </xul:vbox> |
michael@0 | 92 | |
michael@0 | 93 | <xul:button class="downloadButton downloadCancel" |
michael@0 | 94 | tooltiptext="&cmd.cancel.label;" |
michael@0 | 95 | oncommand="goDoCommand('downloadsCmd_cancel')"/> |
michael@0 | 96 | <xul:button class="downloadButton downloadRetry" |
michael@0 | 97 | tooltiptext="&cmd.retry.label;" |
michael@0 | 98 | oncommand="goDoCommand('downloadsCmd_retry')"/> |
michael@0 | 99 | <xul:button class="downloadButton downloadShow" |
michael@0 | 100 | #ifdef XP_MACOSX |
michael@0 | 101 | tooltiptext="&cmd.showMac.label;" |
michael@0 | 102 | #else |
michael@0 | 103 | tooltiptext="&cmd.show.label;" |
michael@0 | 104 | #endif |
michael@0 | 105 | oncommand="goDoCommand('downloadsCmd_show')"/> |
michael@0 | 106 | |
michael@0 | 107 | </content> |
michael@0 | 108 | </binding> |
michael@0 | 109 | |
michael@0 | 110 | <binding id="download-toolbarbutton" |
michael@0 | 111 | extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton"> |
michael@0 | 112 | <content> |
michael@0 | 113 | <children /> |
michael@0 | 114 | <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label"/> |
michael@0 | 115 | <xul:label class="toolbarbutton-text" crop="right" flex="1" |
michael@0 | 116 | xbl:inherits="value=label,accesskey,crop,wrap"/> |
michael@0 | 117 | <xul:label class="toolbarbutton-multiline-text" flex="1" |
michael@0 | 118 | xbl:inherits="xbl:text=label,accesskey,wrap"/> |
michael@0 | 119 | </content> |
michael@0 | 120 | </binding> |
michael@0 | 121 | </bindings> |