blakeross%telocity.com 41fab29b54 Fix cancel button.
git-svn-id: svn://10.0.0.236/trunk@134061 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 00:54:06 +00:00

51 lines
1.7 KiB
XML

<!DOCTYPE window [
<!ENTITY % downloadDTD SYSTEM "chrome://browser/locale/downloads/downloadmanager.dtd" >
%downloadDTD;
]>
<bindings id="downloadBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<binding id="download">
<resources>
<stylesheet src="chrome://browser/skin/downloads/downloadmanager.css"/>
</resources>
<content>
<xul:hbox>
#ifdef XP_WIN
<xul:image style="width: 16px; max-width: 16px; height: 16px; max-height: 16px;" xbl:inherits="src=image"/>
#endif
<xul:label xbl:inherits="value=target"/>
</xul:hbox>
<xul:vbox flex="1"
#ifdef XP_WIN
class="indented"
#endif
>
<xul:hbox flex="1">
<xul:progressmeter mode="normal" value="0"
xbl:inherits="value=progress,mode=progressmode"/>
<xul:label xbl:inherits="value=progress"/>
</xul:hbox>
<xul:hbox align="start">
<xul:label value="&cancel.label;" class="link" onclick="this.parentNode.parentNode.parentNode.cancel();"/>
</xul:hbox>
</xul:vbox>
</content>
<implementation>
<method name="cancel">
<body>
<![CDATA[
const dlmgrContractID = "@mozilla.org/download-manager;1";
const dlmgrIID = Components.interfaces.nsIDownloadManager;
var dlmgr = Components.classes[dlmgrContractID].getService(dlmgrIID);
dlmgr.cancelDownload(this.id);
]]>
</body>
</method>
</implementation>
</binding>
</bindings>