Bug 388517 - revised download manager UI for Firefox 3. Patch by Shawn Wilsher <me@shawnwilsher.com> and Asaf Romano <mano@mozilla.com>. r=mano, a=[wanted-firefox3]

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-08-11 14:53:21 -07:00
parent 35b27bae9a
commit cccc09a7a2
32 changed files with 781 additions and 1350 deletions

View File

@ -1,7 +0,0 @@
<!ENTITY dateStarted.label "Started:">
<!ENTITY dateEnded.label "Finished:">
<!ENTITY window.title "Properties">
<!ENTITY downloadedFrom.label "From:">
<!ENTITY path.label "To:">
<!ENTITY acceptButton.label "Close">
<!ENTITY cmd.close.commandKey "w">

View File

@ -3,7 +3,6 @@
<!ENTITY done.label "Done">
<!ENTITY canceled.label "Canceled">
<!ENTITY installing.label "Installing...">
<!ENTITY starting.label "Starting...">
<!ENTITY failed.label "Failed">
@ -28,8 +27,8 @@
<!ENTITY cmd.retry.accesskey "R">
<!ENTITY cmd.remove.label "Remove">
<!ENTITY cmd.remove.accesskey "e">
<!ENTITY cmd.properties.label "Properties">
<!ENTITY cmd.properties.accesskey "i">
<!ENTITY cmd.info.label "Information">
<!ENTITY cmd.info.accesskey "i">
<!ENTITY cmd.info.commandKey "i">
<!ENTITY cmd.close.commandKey "w">
@ -42,5 +41,8 @@
<!ENTITY closeWhenDone.label "Close when downloads complete">
<!ENTITY closeWhenDone.tooltip "Closes the Downloads window when all files are done downloading">
<!ENTITY filesSavedTo.label "All files downloaded to:">
<!ENTITY showFolder.label "Show this Folder">
<!ENTITY activeDownloads.label "Active">
<!ENTITY completedDownloads.label "Completed">
<!ENTITY searchResults.label "Search Results">

View File

@ -70,7 +70,6 @@
* locale/@AB_CD@/mozapps/downloads/unknownContentType.dtd (%chrome/mozapps/downloads/unknownContentType.dtd)
locale/@AB_CD@/mozapps/downloads/downloads.dtd (%chrome/mozapps/downloads/downloads.dtd)
locale/@AB_CD@/mozapps/downloads/downloads.properties (%chrome/mozapps/downloads/downloads.properties)
locale/@AB_CD@/mozapps/downloads/downloadProperties.dtd (%chrome/mozapps/downloads/downloadProperties.dtd)
locale/@AB_CD@/mozapps/extensions/extensions.dtd (%chrome/mozapps/extensions/extensions.dtd)
locale/@AB_CD@/mozapps/extensions/extensions.properties (%chrome/mozapps/extensions/extensions.properties)
locale/@AB_CD@/mozapps/extensions/about.dtd (%chrome/mozapps/extensions/about.dtd)

View File

@ -22,6 +22,8 @@
# Contributor(s):
# Blake Ross <blakeross@telocity.com> (Original Author)
# Ben Goodger <ben@bengoodger.com> (v2.0)
# Edward Lee <edilee@gmail.com>
# Shawn Wilsher <me@shawnwilsher.com> (v3.0)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -37,81 +39,112 @@
#
# ***** END LICENSE BLOCK *****
var gStrings = [];
const interval = 500; // Update every 500 milliseconds.
function DownloadProgressListener (aDocument, aStringBundle)
function DownloadProgressListener()
{
this.doc = aDocument;
this._statusFormat = aStringBundle.getString("statusFormat2");
this._transferSameUnits = aStringBundle.getString("transferSameUnits");
this._transferDiffUnits = aStringBundle.getString("transferDiffUnits");
this._transferNoTotal = aStringBundle.getString("transferNoTotal");
this._timeLeft = aStringBundle.getString("timeLeft");
this._timeLessMinute = aStringBundle.getString("timeLessMinute");
this._timeUnknown = aStringBundle.getString("timeUnknown");
this._units = [aStringBundle.getString("bytes"),
aStringBundle.getString("kilobyte"),
aStringBundle.getString("megabyte"),
aStringBundle.getString("gigabyte")];
var sb = document.getElementById("downloadStrings");
this._statusFormat = sb.getString("statusFormat2");
this._transferSameUnits = sb.getString("transferSameUnits");
this._transferDiffUnits = sb.getString("transferDiffUnits");
this._transferNoTotal = sb.getString("transferNoTotal");
this._timeLeft = sb.getString("timeLeft");
this._timeLessMinute = sb.getString("timeLessMinute");
this._timeUnknown = sb.getString("timeUnknown");
this._units = [sb.getString("bytes"),
sb.getString("kilobyte"),
sb.getString("megabyte"),
sb.getString("gigabyte")];
}
DownloadProgressListener.prototype =
{
doc: null,
onDownloadStateChange: function dlPL_onDownloadStateChange(aState, aDownload)
{
var downloadID = "dl" + aDownload.id;
var download = this.doc.getElementById(downloadID);
if (download)
download.setAttribute("state", aDownload.state);
var dl = getDownload(aDownload.id);
switch (aDownload.state) {
case Ci.nsIDownloadManager.DOWNLOAD_NOTSTARTED:
// We'll have at least one active download now
gDownloadsActiveLabel.hidden = false;
case Ci.nsIDownloadManager.DOWNLOAD_DOWNLOADING:
// if dl is non-null, the download is already added to the UI, so we
// just make sure it is where it is supposed to be
if (!dl) {
// We have to create the download object
let uri = Cc["@mozilla.org/network/util;1"].
getService(Ci.nsIIOService).
newFileURI(aDownload.targetFile);
dl = createDownloadItem(aDownload.id,
uri.spec,
aDownload.displayName,
aDownload.source.spec,
aDownload.state,
"",
aDownload.percentComplete,
Math.round(aDownload.startTime / 1000));
}
gDownloadsView.insertBefore(dl, gDownloadsActiveLabel.nextSibling);
break;
case Ci.nsIDownloadManager.DOWNLOAD_FAILED:
case Ci.nsIDownloadManager.DOWNLOAD_CANCELED:
downloadCompleted(aDownload);
break;
case Ci.nsIDownloadManager.DOWNLOAD_FINISHED:
downloadCompleted(aDownload);
autoRemoveAndClose(aDownload);
break;
}
// autoRemoveAndClose could have already closed our window...
try {
dl.setAttribute("state", aDownload.state);
gDownloadViewController.onCommandUpdate();
} catch (e) { }
},
onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus, aDownload)
{
if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {
var downloadID = "dl" + aDownload.id;
var download = this.doc.getElementById(downloadID);
if (download)
download.setAttribute("status", "");
let dl = getDownload(aDownload.id);
if (dl)
dl.setAttribute("status", "");
}
},
onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress, aDownload)
{
var overallProgress = aCurTotalProgress;
var downloadID = "dl" + aDownload.id;
var download = this.doc.getElementById(downloadID);
// Calculate percentage.
var percent;
if (aMaxTotalProgress > 0) {
percent = Math.floor((overallProgress*100.0)/aMaxTotalProgress);
if (percent > 100)
percent = 100;
// Advance progress meter.
if (download) {
download.setAttribute("progress", percent);
download.setAttribute("progressmode", "normal");
onUpdateProgress();
}
} else {
percent = -1;
// Progress meter should be barber-pole in this case.
download.setAttribute("progressmode", "undetermined");
var download = getDownload(aDownload.id);
if (!download) {
// d'oh - why this happens is complicated, let's just add it in
let uri = Cc["@mozilla.org/network/util;1"].
getService(Ci.nsIIOService).newFileURI(aDownload.targetFile);
let itm = createDownloadItem(aDownload.id, uri.spec,
aDownload.displayName,
aDownload.source.spec,
aDownload.state,
aDownload.percentComplete);
download = gDownloadsView.insertBefore(itm, gDownloadsActiveLabel.nextSibling);
}
// Now that we've set the progress and the time, update the UI with
// all the the pertinent information (bytes transferred, bytes total,
// download rate, time remaining).
// any activity means we should have active downloads!
gDownloadsActiveLabel.hidden = false;
// Update this download's progressmeter
if (aDownload.percentComplete == -1)
download.setAttribute("progressmode", "undetermined");
else {
download.setAttribute("progressmode", "normal");
download.setAttribute("progress", aDownload.percentComplete);
}
// Dispatch ValueChange for a11y
var event = document.createEvent("Events");
event.initEvent("ValueChange", true, true);
document.getAnonymousElementByAttribute(download, "anonid", "progressmeter")
.dispatchEvent(event);
// Update the rest of the UI (bytes transferred, bytes total, download rate,
// time remaining).
let status = this._statusFormat;
// Update the bytes transferred and bytes total
@ -133,8 +166,7 @@ DownloadProgressListener.prototype =
// Insert 1 is the download progress
status = this._replaceInsert(status, 1, transfer);
if (download)
download.setAttribute("status-internal", transfer);
download.setAttribute("status-internal", transfer);
}
// Update the download rate
@ -162,8 +194,7 @@ DownloadProgressListener.prototype =
status = this._replaceInsert(status, 4, remain);
}
if (download)
download.setAttribute("status", status);
download.setAttribute("status", status);
},
onLocationChange: function(aWebProgress, aRequest, aLocation, aDownload)
{
@ -178,9 +209,9 @@ DownloadProgressListener.prototype =
{
if (iid.equals(Components.interfaces.nsIDownloadProgressListener) ||
iid.equals(Components.interfaces.nsISupports))
return this;
return this;
throw Components.results.NS_NOINTERFACE;
throw Cr.NS_NOINTERFACE;
},
_replaceInsert: function ( text, index, value )

View File

@ -1,46 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -24,6 +24,7 @@
# Contributor(s):
# Ben Goodger <ben@bengoodger.com> (v2.0)
# Blake Ross <blakeross@telocity.com>
# Shawn Wilsher <me@shawnwilsher.com> (v3.0)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -57,25 +58,13 @@
<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#">
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="download-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
<resources>
<stylesheet src="chrome://mozapps/skin/downloads/downloads.css"/>
</resources>
<implementation>
<method name="fireEvent">
<parameter name="aEventType"/>
<body>
<![CDATA[
var e = document.createEvent("Events");
e.initEvent("download-" + aEventType, true, true);
this.dispatchEvent(e);
]]>
</body>
</method>
<property name="paused">
<getter>
<![CDATA[
@ -121,14 +110,6 @@
]]>
</getter>
</property>
<method name="pauseResume">
<body>
<![CDATA[
// Do nothing.
]]>
</body>
</method>
</implementation>
</binding>
@ -137,16 +118,21 @@
<xul:hbox flex="1">
#ifdef SHOW_ICONS
<xul:vbox pack="start">
<xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
<xul:image class="downloadTypeIcon" validate="always"
xbl:inherits="src=image"/>
</xul:vbox>
#endif
<xul:vbox pack="start" flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:label value="&starting.label;"/>
<xul:label xbl:inherits="value=target,tooltiptext=target"
crop="center" class="name"/>
<xul:progressmeter mode="normal" value="0" flex="1"
anonid="progressmeter"/>
<xul:label value="&starting.label;" class="status"/>
<xul:spacer flex="1"/>
</xul:vbox>
<xul:vbox pack="start">
<xul:label value="&cmd.cancel.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.fireEvent('cancel');"/>
<xul:vbox pack="center">
<xul:button class="cancel" tooltiptext="&cmd.cancel.label;"
command="cmd_cancel"/>
</xul:vbox>
</xul:hbox>
</content>
@ -154,143 +140,33 @@
<binding id="download-downloading" extends="chrome://mozapps/content/downloads/download.xml#download-base">
<content>
<xul:hbox flex="1" class="downloadContentBox" xbl:inherits="animated,animated-temp">
<xul:hbox flex="1" class="downloadContentBox">
#ifdef SHOW_ICONS
<xul:vbox pack="start">
<xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
<xul:image class="downloadTypeIcon" validate="always"
xbl:inherits="src=image"/>
</xul:vbox>
#endif
<xul:vbox flex="1">
<xul:hbox flex="1">
<xul:label xbl:inherits="value=target,tooltiptext=target"
crop="center" flex="2" class="name"/>
<xul:hbox>
<xul:vbox flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:progressmeter anonid="progressmeter" mode="normal" value="0" flex="1"
xbl:inherits="value=progress,mode=progressmode"/>
<xul:progressmeter mode="normal" value="0" flex="1"
anonid="progressmeter"
xbl:inherits="value=progress,mode=progressmode"/>
</xul:vbox>
<xul:vbox pack="start">
<xul:label value="&cmd.cancel.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.parentNode.parentNode.fireEvent('cancel');"/>
</xul:vbox>
</xul:hbox>
<xul:hbox align="center">
<xul:label value="&cmd.pause.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.parentNode.fireEvent('pause');"/>
<xul:label xbl:inherits="value=status" flex="1" crop="right"/>
</xul:hbox>
<xul:button class="pause" tooltiptext="&cmd.pause.label;"
command="cmd_pause"/>
<xul:button class="cancel" tooltiptext="&cmd.cancel.label;"
command="cmd_cancel"/>
</xul:hbox>
<xul:label xbl:inherits="value=status,tooltiptext=status" flex="1"
crop="right" class="status"/>
<xul:spacer flex="1"/>
</xul:vbox>
</xul:hbox>
</content>
<implementation>
<!-- ANIMATE: Type Icon -->
<property name="_ati_kTimeout" onget="return 50;"/>
<property name="_ati_kUpperBounds" onget="return 90;"/>
<property name="_ati_kLowerBounds" onget="return 30;"/>
<property name="_ati_kIncrement" onget="return 5;"/>
<field name="_atiStep">0</field>
<field name="_atiIsIncrementing">true</field>
<field name="_atiInterval">-1</field>
<method name="_atiTimerCallback">
<parameter name="aDownload"/>
<parameter name="aIcon"/>
<body>
<![CDATA[
if (aDownload.getAttribute("state") != "0") {
clearInterval(aDownload._atiInterval)
return;
}
if (aDownload._atiIsIncrementing)
aDownload._atiStep += aDownload._ati_kIncrement;
else
aDownload._atiStep -= aDownload._ati_kIncrement;
if (aDownload._atiStep == aDownload._ati_kUpperBounds)
aDownload._atiIsIncrementing = false;
else if (aDownload._atiStep == aDownload._ati_kLowerBounds)
aDownload._atiIsIncrementing = true;
aIcon.setAttribute("style", "opacity: 0." + aDownload._atiStep );
]]>
</body>
</method>
<method name="_animateIcon">
<body>
<![CDATA[
this._atiStep = this._ati_kLowerBounds;
this._atiIsIncrementing = true;
var icon = document.getAnonymousElementByAttribute(this, "class", "downloadTypeIcon");
this._atiInterval = setInterval(this._atiTimerCallback, this._ati_kTimeout, this, icon);
]]>
</body>
</method>
<!-- ANIMATE: Download -->
<property name="_adl_kTimeout" onget="return 50;"/>
<property name="_adl_kUpperBounds" onget="return 1.00;"/>
<property name="_adl_kLowerBounds" onget="return 0.00;"/>
<property name="_adl_kIncrement" onget="return 0.05;"/>
<field name="_adlStep">0</field>
<method name="_adlTimerCallback">
<parameter name="aDownload"/>
<parameter name="aContent"/>
<body>
<![CDATA[
if (aDownload.getAttribute("state") != "0" ||
aDownload._adlStep > aDownload._adl_kUpperBounds) {
aDownload.fireEvent('animated');
return;
}
// Don't even bother if we're going away.
if (!aContent.ownerDocument)
return;
aDownload._adlStep += aDownload._adl_kIncrement;
aContent.setAttribute("style", "opacity: " + aDownload._adlStep + "!important;");
setTimeout(aDownload._adlTimerCallback, aDownload._adl_kTimeout, aDownload, aContent);
]]>
</body>
</method>
<method name="_animateDownload">
<body>
<![CDATA[
this._adlStep = this._adl_kLowerBounds;
var box = document.getAnonymousElementByAttribute(this, "class", "downloadContentBox");
setTimeout(this._adlTimerCallback, this._adl_kTimeout, this, box);
]]>
</body>
</method>
<method name="_shouldDownloadAnimate">
<body>
<![CDATA[
return this.getAttribute("animated") != "true";
]]>
</body>
</method>
<method name="pauseResume">
<body>
<![CDATA[
this.fireEvent("pause");
]]>
</body>
</method>
<constructor>
<![CDATA[
// this._animateIcon();
if (this._shouldDownloadAnimate())
this._animateDownload();
]]>
</constructor>
</implementation>
</binding>
<binding id="download-paused" extends="chrome://mozapps/content/downloads/download.xml#download-base">
@ -298,38 +174,30 @@
<xul:hbox flex="1">
#ifdef SHOW_ICONS
<xul:vbox pack="start">
<xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
<xul:image class="downloadTypeIcon" validate="always"
xbl:inherits="src=image"/>
</xul:vbox>
#endif
<xul:vbox flex="1">
<xul:hbox flex="1">
<xul:label xbl:inherits="value=target,tooltiptext=target"
crop="center" flex="2" class="name"/>
<xul:hbox>
<xul:vbox flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:progressmeter anonid="progressmeter" mode="normal" value="0" flex="1"
xbl:inherits="value=progress,mode=progressmode"/>
<xul:progressmeter mode="normal" value="0" flex="1"
anonid="progressmeter"
xbl:inherits="value=progress,mode=progressmode"/>
</xul:vbox>
<xul:vbox pack="start">
<xul:label value="&cmd.cancel.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.parentNode.parentNode.fireEvent('cancel');"/>
</xul:vbox>
</xul:hbox>
<xul:hbox align="center">
<xul:label value="&cmd.resume.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.parentNode.fireEvent('resume');"/>
<xul:label xbl:inherits="value=status" flex="1" crop="right"/>
</xul:hbox>
<xul:button class="resume" tooltiptext="&cmd.resume.label;"
command="cmd_resume"/>
<xul:button class="cancel" tooltiptext="&cmd.cancel.label;"
command="cmd_cancel"/>
</xul:hbox>
<xul:label xbl:inherits="value=target,tooltiptext=target" flex="1"
crop="right" class="status"/>
<xul:spacer flex="1"/>
</xul:vbox>
</xul:hbox>
</content>
<implementation>
<method name="pauseResume">
<body>
<![CDATA[
this.fireEvent("resume");
]]>
</body>
</method>
</implementation>
</binding>
<binding id="download-done" extends="chrome://mozapps/content/downloads/download.xml#download-base">
@ -337,18 +205,23 @@
<xul:hbox flex="1">
#ifdef SHOW_ICONS
<xul:vbox pack="start">
<xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
<xul:image class="downloadTypeIcon" validate="always"
xbl:inherits="src=image"/>
</xul:vbox>
#endif
<xul:vbox pack="start" flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:label value="&done.label;"/>
<xul:label xbl:inherits="value=target,tooltiptext=target"
crop="center" class="name"/>
<xul:spacer flex="1"/>
<xul:label value="&done.label;" class="status"/>
</xul:vbox>
<xul:vbox pack="start">
<xul:label value="&cmd.open.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.fireEvent('open');"/>
<xul:label value="&cmd.remove.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.fireEvent('remove');"/>
<xul:vbox pack="center">
<xul:hbox>
<xul:button class="open" tooltiptext="&cmd.open.label;"
command="cmd_open"/>
<xul:button class="info" tooltiptext="&cmd.info.label;"
command="cmd_showInfo" anonid="info"/>
</xul:hbox>
</xul:vbox>
</xul:hbox>
</content>
@ -359,18 +232,23 @@
<xul:hbox flex="1">
#ifdef SHOW_ICONS
<xul:vbox pack="start">
<xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
<xul:image class="downloadTypeIcon" validate="always"
xbl:inherits="src=image"/>
</xul:vbox>
#endif
<xul:vbox pack="start" flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:label value="&canceled.label;"/>
<xul:label xbl:inherits="value=target,tooltiptext=target"
crop="center" class="name"/>
<xul:spacer flex="1"/>
<xul:label value="&canceled.label;" class="status"/>
</xul:vbox>
<xul:vbox pack="start">
<xul:label value="&cmd.retry.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.fireEvent('retry');"/>
<xul:label value="&cmd.remove.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.fireEvent('remove');"/>
<xul:vbox pack="center">
<xul:hbox>
<xul:button class="retry" tooltiptext="&cmd.retry.label;"
command="cmd_retry"/>
<xul:button class="info" tooltiptext="&cmd.info.label;"
command="cmd_showInfo" anonid="info"/>
</xul:hbox>
</xul:vbox>
</xul:hbox>
</content>
@ -381,106 +259,24 @@
<xul:hbox flex="1">
#ifdef SHOW_ICONS
<xul:vbox pack="start">
<xul:image class="downloadTypeIcon" validate="always" style="width: 32px; max-width: 32px; height: 32px; max-height: 32px;" xbl:inherits="src=image"/>
<xul:image class="downloadTypeIcon" validate="always"
xbl:inherits="src=image"/>
</xul:vbox>
#endif
<xul:vbox pack="start" flex="1">
<xul:label xbl:inherits="value=target" crop="center"/>
<xul:label value="&failed.label;"/>
<xul:label xbl:inherits="value=target,tooltiptext=target"
crop="center" class="name"/>
<xul:spacer flex="1"/>
<xul:label value="&failed.label;" class="status"/>
</xul:vbox>
<xul:vbox pack="start">
<xul:label value="&cmd.retry.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.fireEvent('retry');"/>
<xul:label value="&cmd.remove.label;" class="text-link"
onclick="this.parentNode.parentNode.parentNode.fireEvent('remove');"/>
<xul:button class="retry" tooltiptext="&cmd.retry.label;"
command="cmd_retry"/>
<xul:button class="info" tooltiptext="&cmd.info.label;"
command="cmd_showInfo" anonid="info"/>
</xul:vbox>
</xul:hbox>
</content>
</binding>
<binding id="download-view">
<implementation>
<field name="_selected">null</field>
<property name="selected">
<setter>
<![CDATA[
if (this._selected)
this._selected.removeAttribute("selected");
this._selected = val;
if (this._selected)
this._selected.setAttribute("selected", "true");
]]>
</setter>
<getter>
<![CDATA[
return this._selected;
]]>
</getter>
</property>
<method name="selectionForward">
<parameter name="aEvent"/>
<body>
<![CDATA[
if (this.selected) {
if (this.selected.nextSibling &&
this.selected.nextSibling.localName == "download")
this.selected = this.selected.nextSibling;
}
else {
if (this.hasChildNodes())
this.selected = this.firstChild.nextSibling;
}
]]>
</body>
</method>
<method name="selectionBackward">
<parameter name="aEvent"/>
<body>
<![CDATA[
if (this.selected) {
if (this.selected.previousSibling &&
this.selected.previousSibling.localName == "download")
this.selected = this.selected.previousSibling;
}
else {
if (this.hasChildNodes())
this.selected = this.lastChild;
}
]]>
</body>
</method>
</implementation>
<handlers>
<handler event="focus">
<![CDATA[
this.selected = event.target;
]]>
</handler>
<handler event="click">
<![CDATA[
if (event.ctrlKey) {
this.selected = null;
return;
}
this.selected = event.target;
]]>
</handler>
<handler event="keypress" keycode="VK_ENTER" action="if (this.selected) this.selected.fireEvent('open');"/>
<handler event="keypress" keycode="VK_RETURN" action="if (this.selected) this.selected.fireEvent('open');"/>
<handler event="keypress" keycode="VK_UP" action="this.selectionBackward(event);"/>
<handler event="keypress" keycode="VK_LEFT" action="this.selectionBackward(event);"/>
<handler event="keypress" keycode="VK_DOWN" action="this.selectionForward(event);"/>
<handler event="keypress" keycode="VK_RIGHT" action="this.selectionForward(event);"/>
<handler event="keypress" keycode="VK_UP" modifiers="meta" action="this.selected = null;"/>
<handler event="keypress" keycode="VK_DOWN" modifiers="meta" action="this.selected = null;"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="meta" action="this.selected = null;"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="meta" action="this.selected = null;"/>
<handler event="keypress" keycode="VK_DELETE" action="if (this.selected) this.selected.fireEvent('remove');"/>
<handler event="keypress" key=" " action="if (this.selected) { this.selected.pauseResume(); }"/>
</handlers>
</binding>
</bindings>

View File

@ -1,101 +0,0 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla.org Code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Blake Ross <blakeross@telocity.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
function Startup()
{
const dlmgrContractID = "@mozilla.org/download-manager;1";
const dlmgrIID = Components.interfaces.nsIDownloadManager;
var dm = Components.classes[dlmgrContractID].getService(dlmgrIID);
var db = dm.DBConnection;
const dateTimeContractID = "@mozilla.org/intl/scriptabledateformat;1";
const dateTimeIID = Components.interfaces.nsIScriptableDateFormat;
var dts = Components.classes[dateTimeContractID].getService(dateTimeIID);
var dateStartedField = document.getElementById("dateStarted");
var dateEndedField = document.getElementById("dateEnded");
var pathField = document.getElementById("path");
var sourceField = document.getElementById("source");
var dlid = window.arguments[0].replace(/^dl([0-9]+)$/, "$1");
var stmt = db.createStatement("SELECT startTime, endTime, target, source " +
"FROM moz_downloads " +
"WHERE id = ?1");
stmt.bindInt64Parameter(0, dlid);
stmt.executeStep();
var dateStarted = new Date(stmt.getInt64(0) / 1000);
dateStarted = dts.FormatDateTime("", dts.dateFormatShort,
dts.timeFormatSeconds,
dateStarted.getFullYear(),
dateStarted.getMonth() + 1,
dateStarted.getDate(),
dateStarted.getHours(),
dateStarted.getMinutes(),
dateStarted.getSeconds());
dateStartedField.setAttribute("value", dateStarted);
var dateEnded = new Date(stmt.getInt64(1) / 1000);
dateEnded = dts.FormatDateTime("", dts.dateFormatShort,
dts.timeFormatSeconds,
dateEnded.getFullYear(),
dateEnded.getMonth() + 1,
dateEnded.getDate(),
dateEnded.getHours(),
dateEnded.getMinutes(),
dateEnded.getSeconds());
dateEndedField.setAttribute("value", dateEnded);
pathField.value = stmt.getUTF8String(2);
sourceField.value = stmt.getUTF8String(3);
stmt.reset();
var dl = dm.getDownload(dlid);
if (dl.state == dlmgrIID.DOWNLOAD_DOWNLOADING ||
dl.state == dlmgrIID.DOWNLOAD_PAUSED ||
dl.state == dlmgrIID.DOWNLOAD_NOTSTARTED) {
document.getElementById("dateEndedRow").hidden = true;
document.getElementById("dateEndedSeparator").hidden = true;
}
document.documentElement.getButton("accept").label = document.documentElement.getAttribute("acceptbuttontext");
document.documentElement.getButton("accept").focus();
}

View File

@ -1,100 +0,0 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla.org Code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Blake Ross <blakeross@telocity.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/skin/downloads/downloads.css"?>
<!DOCTYPE window [
<!ENTITY % downloadPropertiesDTD SYSTEM "chrome://mozapps/locale/downloads/downloadProperties.dtd">
%downloadPropertiesDTD;
]>
<dialog xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&window.title;"
onload="Startup();"
style="width: 30em;"
buttons="accept" acceptbuttontext="&acceptButton.label;">
<script type="application/javascript" src="chrome://mozapps/content/downloads/downloadProperties.js"/>
<keyset id="downloadInfoKeys">
<key id="key_close" key="&cmd.close.commandKey;" oncommand="window.close()" modifiers="accel"/>
</keyset>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<hbox pack="end">
<label value="&downloadedFrom.label;" class="bold"/>
</hbox>
<textbox id="source" readonly="true"/>
</row>
<separator class="thin"/>
<row align="center">
<hbox pack="end">
<label value="&path.label;" class="bold"/>
</hbox>
<textbox id="path" readonly="true"/>
</row>
<separator class="thin"/>
<row align="center">
<hbox pack="end">
<label value="&dateStarted.label;" class="bold"/>
</hbox>
<label id="dateStarted"/>
</row>
<separator class="thin" id="dateEndedSeparator"/>
<row align="center" id="dateEndedRow">
<hbox pack="end">
<label value="&dateEnded.label;" class="bold"/>
</hbox>
<label id="dateEnded"/>
</row>
</rows>
</grid>
<separator/>
</dialog>

View File

@ -1,29 +1,30 @@
download {
richlistitem[type="download"] {
-moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-starting');
-moz-box-orient: vertical;
}
download[state="0"] {
richlistitem[type="download"][state="0"] {
-moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-downloading');
}
download[state="1"] {
richlistitem[type="download"][state="1"] {
-moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-done');
}
download[state="2"] {
richlistitem[type="download"][state="2"] {
-moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-failed');
}
download[state="3"] {
richlistitem[type="download"][state="3"] {
-moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-canceled');
}
download[state="4"] {
richlistitem[type="download"][state="4"] {
-moz-binding: url('chrome://mozapps/content/downloads/download.xml#download-paused');
}
/* Only focus links in the selected item*/
download:not([selected="true"]) .text-link {
/* Only focus buttons in the selected item*/
richlistitem[type="download"]:not([selected="true"]) button {
-moz-user-focus: none;
}

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,7 @@
# Contributor(s):
# Ben Goodger <ben@bengoodger.com> (v2.0)
# Blake Ross <blakeross@telocity.com>
# Shawn Wilsher <me@shawnwilsher.com> (v3.0)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -63,8 +64,8 @@
onload="Startup();" onunload="Shutdown();"
onclose="return closeWindow(false);">
<script type="application/javascript" src="chrome://mozapps/content/downloads/DownloadProgressListener.js"/>
<script type="application/javascript" src="chrome://mozapps/content/downloads/downloads.js"/>
<script type="application/javascript" src="chrome://mozapps/content/downloads/DownloadProgressListener.js"/>
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
<script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
@ -77,12 +78,28 @@
<commandset id="downloadsCommands"
commandupdater="true"
oncommandupdate="gDownloadViewController.onCommandUpdate();">
<command id="cmd_cleanUp" oncommand="gDownloadViewController.doCommand('cmd_cleanUp');"/>
<command id="cmd_remove" oncommand="gDownloadViewController.doCommand('cmd_remove');"/>
<command id="cmd_cancel"
oncommand="gDownloadViewController.doCommand('cmd_cancel');"/>
<command id="cmd_open"
oncommand="gDownloadViewController.doCommand('cmd_open');"/>
<command id="cmd_pause"
oncommand="gDownloadViewController.doCommand('cmd_pause');"/>
<command id="cmd_pauseResume"
oncommand="gDownloadViewController.doCommand('cmd_pauseResume');"/>
<command id="cmd_remove"
oncommand="gDownloadViewController.doCommand('cmd_remove');"/>
<command id="cmd_resume"
oncommand="gDownloadViewController.doCommand('cmd_resume');"/>
<command id="cmd_retry"
oncommand="gDownloadViewController.doCommand('cmd_retry');"/>
<command id="cmd_show"
oncommand="gDownloadViewController.doCommand('cmd_show');"/>
<command id="cmd_showInfo"
oncommand="gDownloadViewController.doCommand('cmd_showInfo');"/>
</commandset>
<keyset id="downloadKeys">
<key id="key_cleanUp" keycode="VK_DELETE" command="cmd_cleanUp" modifiers="accel,shift"/>
<key id="key_pauseResume" key=" " command="cmd_pauseResume"/>
<key id="key_remove" keycode="VK_DELETE" command="cmd_remove"/>
<key id="key_close" key="&cmd.close.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
#ifdef XP_GNOME
@ -97,20 +114,17 @@
<vbox id="contextMenuPalette" hidden="true">
<menuitem id="menuitem_pause"
label="&cmd.pause.label;" accesskey="&cmd.pause.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'pause');"/>
command="cmd_pause"/>
<menuitem id="menuitem_resume"
label="&cmd.resume.label;" accesskey="&cmd.resume.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'resume');"/>
command="cmd_resume"/>
<menuitem id="menuitem_cancel"
label="&cmd.cancel.label;" accesskey="&cmd.cancel.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'cancel');"/>
command="cmd_cancel"/>
<menuitem id="menuitem_open" default="true"
label="&cmd.open.label;" accesskey="&cmd.open.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'open');"/>
<menuitem id="menuitem_openWith"
label="&cmd.openWith.label;" accesskey="&cmd.openWith.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'openWith');"/>
command="cmd_open"/>
<menuitem id="menuitem_show"
#ifdef XP_MACOSX
label="&cmd.show.labelMac;"
@ -119,46 +133,44 @@
label="&cmd.show.label;"
accesskey="&cmd.show.accesskey;"
#endif
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'show');"/>
command="cmd_show"/>
<menuitem id="menuitem_retry" default="true"
label="&cmd.retry.label;" accesskey="&cmd.retry.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'retry');"/>
command="cmd_retry"/>
<menuitem id="menuitem_remove"
label="&cmd.remove.label;" accesskey="&cmd.remove.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'remove');"/>
<menuseparator id="menuseparator_properties"/>
<menuitem id="menuitem_properties"
label="&cmd.properties.label;" accesskey="&cmd.properties.accesskey;"
oncommand="fireEventForElement(gDownloadsView.selectedItem, 'properties');"/>
command="cmd_remove"/>
</vbox>
<popup id="downloadContextMenu" onpopupshowing="return buildContextMenu(event);"/>
<menupopup id="downloadContextMenu" onpopupshowing="return buildContextMenu(event);"/>
<!--Information popup-->
<panel id="information" orient="vertical" align="start">
<label id="information-title" flex="1"/>
<button type="image" crop="center" id="information-uri" flex="1"/>
<button type="image" crop="center" id="information-location" flex="1" command="cmd_show"/>
</panel>
<richlistbox id="downloadView" flex="1" context="downloadContextMenu"
ondragover="nsDragAndDrop.dragOver(event, gDownloadDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, gDownloadDNDObserver);">
ondragover="nsDragAndDrop.dragOver(event, gDownloadDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, gDownloadDNDObserver);">
<label id="active-downloads" value="&activeDownloads.label;" hidden="true"/>
<label id="other-downloads" value="&completedDownloads.label;"
completedlabel="&completedDownloads.label;"
searchlabel="&searchResults.label;"/>
</richlistbox>
<hbox>
<hbox id="commandBar" flex="1">
<hbox align="center" flex="1" id="autodownloadInfo">
<label>&filesSavedTo.label;</label>
<toolbarbutton class="tabbable" id="saveToFolder" crop="right" flex="1"
oncommand="onDownloadShowFolder();"
tooltiptext="&showFolder.label;"/>
</hbox>
<spring id="autodownloadSpring" hidden="true" flex="1"/>
<separator id="commandBarSeparator"/>
<button id="cleanUpButton"
label="&cmd.cleanUp.label;" accesskey="&cmd.cleanUp.accesskey;" tooltiptext="&cmd.cleanUp.tooltip;"
command="cmd_cleanUp"/>
</hbox>
<hbox id="search">
<textbox type="timed" timeout="500" id="searchbox"
oncommand="performSearch();"/>
<spacer flex="1"/>
<!-- TODO get advanced search working (Bug 390491)
<button label="Advanced Search"/>
-->
<resizer id="windowResizer" dir="bottomright"/>
</hbox>
</hbox>
</window>

View File

@ -8,8 +8,6 @@ toolkit.jar:
* content/mozapps/downloads/DownloadProgressListener.js (downloads/content/DownloadProgressListener.js)
content/mozapps/downloads/downloads.css (downloads/content/downloads.css)
* content/mozapps/downloads/download.xml (downloads/content/download.xml)
* content/mozapps/downloads/downloadProperties.xul (downloads/content/downloadProperties.xul)
* content/mozapps/downloads/downloadProperties.js (downloads/content/downloadProperties.js)
* content/mozapps/preferences/actionsshared.js (preferences/actionsshared.js)
* content/mozapps/preferences/ocsp.js (preferences/ocsp.js)
* content/mozapps/preferences/ocsp.xul (preferences/ocsp.xul)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

View File

@ -1,101 +1,84 @@
/* Download View */
#downloadView {
margin: 0px;
margin: 0;
border-bottom: 1px solid #8E8E8E;
padding: 0px;
-moz-appearance: none;
}
#downloadView .scrollbox-innerbox {
background: url("chrome://mozapps/skin/downloads/background-stripe.gif") #FFFFFF repeat;
}
/* Download Manager Command Bar */
#commandBar {
padding: 4px 16px 4px 0px;
-moz-box-align: center;
}
#cleanUpButton {
-moz-appearance: button-bevel;
min-width: 1px;
padding: 3px 6px;
margin: 0 10px 0 0;
}
#commandBarSeparator {
display:none;
padding: 0;
}
/* Download View Items */
download {
padding: 4px 8px 4px 4px;
height: 32px !important;
min-height: 40px !important;
richlistitem[type="download"] {
padding: 4px 8px 4px 4px;
min-height: 46px !important;
}
download[selected="true"] {
background-color: Highlight !important;
color: HighlightText;
background-image: none !important;
richlistitem[type="download"] .name {
font-size: larger;
}
download[state="0"], download[state="-1"], download[state="4"] {
font: icon !important;
padding-bottom: 7px;
padding-top: 7px;
min-height: 80px !important;
background: url("chrome://mozapps/skin/downloads/background-gradient.gif") repeat;
}
vbox:first-child > label:last-child, hbox:last-child > label:last-child {
color: #666666;
font-size: 95%;
}
download[selected="true"] vbox:first-child > label:last-child,
download[selected="true"] hbox:last-child > label:last-child {
color: HighlightText;
}
/* Download View Items, implementation */
progressmeter {
margin: 6px 6px 4px 6px;
min-height:19px;
richlistitem[type="download"] button {
-moz-appearance: none;
min-height: 16px;
min-width: 16px;
max-height: 16px;
max-width: 16px;
padding: 0;
margin: 0 1px 0 1px;
}
.progress-bar {
background: url("chrome://mozapps/skin/downloads/progress-bar.gif") repeat-x !important;
border-left: 1px solid #D9D9D9 !important;
#information {
-moz-appearance: none;
background-color: white;
width: 300px;
max-width: 300px;
}
download[state="4"] .progress-bar {
background: url("chrome://mozapps/skin/downloads/progress-bar-paused.gif") repeat-x !important;
#information > button {
-moz-appearance: none;
margin: 0;
padding: 0;
width: 300px;
}
.progress-remainder {
background: url("chrome://mozapps/skin/downloads/progress-remainder.gif") repeat-x !important;
border-right: 1px solid #DEDEDE !important;
}
label {
border: none !important;
}
dialog label {
color: #000000 !important;
font-size: 100% !important;
font: icon;
}
#saveToFolder .toolbarbutton-text {
#information > button .button-text {
-moz-box-flex: 1;
text-align: left;
margin-left: 5px !important;
border: 1px solid transparent !important;
}
#saveToFolder:focus .toolbarbutton-text {
border: 1px solid -moz-mac-focusring !important;
/**
* Images for buttons in the interface
*/
richlistitem[type="download"] button,
#information-uri,
#information-location {
list-style-image: url(chrome://mozapps/skin/downloads/buttons.png);
}
.cancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
.info {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
.open {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
.pause {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
.resume {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
.retry {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
#information-uri {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
#information-location {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
/* prevent flickering when changing states */
.downloadTypeIcon {
min-height: 32px;
min-width: 32px;
}

View File

@ -1,19 +0,0 @@
<?xml version="1.0"?>
<bindings id="downloadSkinBindings"
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">
<binding id="download-view" extends="chrome://mozapps/content/downloads/download.xml#download-view">
<content>
<xul:vbox flex="1" class="downloadViewInner1">
<xul:vbox flex="1" class="downloadViewInner2">
<children/>
</xul:vbox>
</xul:vbox>
</content>
</binding>
</bindings>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

View File

@ -1,16 +1,10 @@
classic.jar:
% skin mozapps classic/1.0 %skin/classic/mozapps/
#ifndef MINIMO
skin/classic/mozapps/downloads/progress-bar-paused.gif (downloads/progress-bar-paused.gif)
skin/classic/mozapps/downloads/progress-bar.gif (downloads/progress-bar.gif)
skin/classic/mozapps/downloads/progress-remainder.gif (downloads/progress-remainder.gif)
skin/classic/mozapps/downloads/background-gradient.gif (downloads/background-gradient.gif)
skin/classic/mozapps/downloads/background-stripe.gif (downloads/background-stripe.gif)
skin/classic/mozapps/downloads/download-inprogress.png (downloads/download-inprogress.png)
skin/classic/mozapps/downloads/buttons.png (downloads/buttons.png)
skin/classic/mozapps/downloads/downloadIcon.png (downloads/downloadIcon.png)
skin/classic/mozapps/downloads/downloads.css (downloads/downloads.css)
skin/classic/mozapps/downloads/unknownContentType.css (downloads/unknownContentType.css)
skin/classic/mozapps/downloads/downloads.xml (downloads/downloads.xml)
skin/classic/mozapps/extensions/extensionItem.png (extensions/extensionItem.png)
skin/classic/mozapps/extensions/itemDisabledFader.png (extensions/itemDisabledFader.png)
skin/classic/mozapps/extensions/itemEnabledFader.png (extensions/itemEnabledFader.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -12,87 +12,81 @@
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
}
.downloadViewInner {
background-image: url("chrome://mozapps/skin/downloads/viewFader.png");
padding: 0px;
}
/* Download Manager Command Bar */
#commandBar {
padding: 0px 10px 5px 10px;
}
#cleanUpButton {
margin: 0px;
list-style-image: url("chrome://mozapps/skin/downloads/downloadCleanup.png");
}
#cleanUpButton .button-icon {
margin-top: 0px;
margin-bottom: 0px;
-moz-margin-start: 0px;
-moz-margin-end: 5px;
}
#cleanUpButton[disabled="true"] {
list-style-image: url("chrome://mozapps/skin/downloads/downloadCleanupDisabled.png");
}
#commandBarSeparator {
-moz-margin-start: 5px;
}
/* Download View Items */
download {
padding-top: 13px;
padding-bottom: 13px;
-moz-padding-start: 13px;
-moz-padding-end: 10px;
min-height: 25px;
border-bottom: 1px dotted #C0C0C0;
richlistitem[type="download"] {
padding: 4px 8px 4px 4px;
min-height: 46px !important;
}
download[selected="true"] {
background-image: url("chrome://mozapps/skin/downloads/downloadSelected.png") !important;
border-bottom: 1px dotted #7F9DB9;
richlistitem[type="download"] .name {
font-size: larger;
}
download[state="0"], download[state="-1"], download[state="4"],
download[state="5"], download[state="6"] {
background-color: transparent;
background-image: url("chrome://mozapps/skin/downloads/downloadFader.png");
richlistitem[type="download"] button {
-moz-appearance: none;
min-height: 16px;
min-width: 16px;
max-height: 16px;
max-width: 16px;
padding: 0;
margin: 0 1px 0 1px;
}
/* Download View Items, implementation */
.downloadContentBox {
opacity: 0.0;
#information {
-moz-appearance: none;
background-color: white;
width: 300px;
max-width: 300px;
}
.downloadContentBox[animated="true"] {
opacity: 1.0;
#information > button {
-moz-appearance: none;
margin: 0;
padding: 0;
width: 300px;
}
.downloadTypeIcon {
-moz-margin-end: 10px;
}
#folderIcon {
width: 16px;
height: 16px;
}
#folderName {
width: 0px;
}
#saveToFolder {
padding-top: 1px;
padding-bottom: 3px;
-moz-padding-start: 5px;
-moz-padding-end: 6px;
}
#saveToFolder .toolbarbutton-text {
#information > button .button-text {
-moz-box-flex: 1;
text-align: left;
-moz-margin-start: 5px !important;
}
/**
* Images for buttons in the interface
*/
richlistitem[type="download"] button,
#information-uri,
#information-location {
list-style-image: url(chrome://mozapps/skin/downloads/buttons.png);
}
.cancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
.info {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
.open {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
.pause {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
.resume {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
.retry {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
#information-uri {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
#information-location {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
/* prevent flickering when changing states */
.downloadTypeIcon {
min-height: 32px;
min-width: 32px;
}

View File

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<bindings id="downloadSkinBindings"
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">
<binding id="download-view" extends="chrome://mozapps/content/downloads/download.xml#download-view">
<content>
<xul:vbox flex="1" class="downloadViewInner">
<children/>
</xul:vbox>
</content>
</binding>
</bindings>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 849 B

View File

@ -1,15 +1,10 @@
classic.jar:
% skin mozapps classic/1.0 %skin/classic/mozapps/
#ifndef MINIMO
skin/classic/mozapps/downloads/buttons.png (downloads/buttons.png)
skin/classic/mozapps/downloads/downloadIcon.png (downloads/downloadIcon.png)
skin/classic/mozapps/downloads/downloadCleanup.png (downloads/downloadCleanup.png)
skin/classic/mozapps/downloads/downloadCleanupDisabled.png (downloads/downloadCleanupDisabled.png)
skin/classic/mozapps/downloads/downloads.css (downloads/downloads.css)
skin/classic/mozapps/downloads/downloads.xml (downloads/downloads.xml)
skin/classic/mozapps/downloads/downloadsBG.png (downloads/downloadsBG.png)
skin/classic/mozapps/downloads/downloadSelected.png (downloads/downloadSelected.png)
skin/classic/mozapps/downloads/unknownContentType.css (downloads/unknownContentType.css)
skin/classic/mozapps/downloads/viewFader.png (downloads/viewFader.png)
skin/classic/mozapps/extensions/about.css (extensions/about.css)
skin/classic/mozapps/extensions/actionbuttons.png (extensions/actionbuttons.png)
skin/classic/mozapps/extensions/extensions.css (extensions/extensions.css)