home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 May
/
PCWorld_2003-05_cd.bin
/
Komunik
/
phoenix
/
chrome
/
browser.jar
/
content
/
browser
/
downloads
/
download-bindings.xml
next >
Wrap
Text File
|
2002-11-18
|
2KB
|
47 lines
<!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>
<xul:image style="width: 16px; max-width: 16px; height: 16px; max-height: 16px;" xbl:inherits="src=image"/>
<xul:label xbl:inherits="value=target"/>
</xul:hbox>
<xul:vbox flex="1"
class="indented"
>
<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>