diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-29 07:33:26 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-29 07:33:26 +0200 |
commit | 8bd13f3a28c512f6b4523a1e3930dcfa0c2bbb55 (patch) | |
tree | e65a640f23418fbabe5f3d83d39201f5d7ddc2fb /application | |
parent | 1b414c2b93be093ea8c0a8366ca0ef7fc8f0509e (diff) | |
download | UXP-8bd13f3a28c512f6b4523a1e3930dcfa0c2bbb55.tar UXP-8bd13f3a28c512f6b4523a1e3930dcfa0c2bbb55.tar.gz UXP-8bd13f3a28c512f6b4523a1e3930dcfa0c2bbb55.tar.lz UXP-8bd13f3a28c512f6b4523a1e3930dcfa0c2bbb55.tar.xz UXP-8bd13f3a28c512f6b4523a1e3930dcfa0c2bbb55.zip |
[PALEMOON] Bug 1115972 - Don't fall back to the Places icon for downloads without the target file name annotation
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/components/downloads/content/allDownloadsViewOverlay.js | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js index 0c28d218a..a0493c5f4 100644 --- a/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js +++ b/application/palemoon/components/downloads/content/allDownloadsViewOverlay.js @@ -58,8 +58,7 @@ const NOT_AVAILABLE = Number.MAX_VALUE; * - The DownloadsPlacesView object implements onDataItemStateChanged and * onDataItemChanged of the DownloadsView pseudo interface. * - The DownloadsPlacesView object adds itself as a places result observer and - * calls this object's placesNodeIconChanged and placesNodeAnnotationChanged - * from its callbacks. + * calls this object's placesNodeAnnotationChanged from its callbacks. * * @param [optional] aDataItem * The data item of a the session download. Required if aPlacesNode is not set @@ -164,12 +163,10 @@ DownloadElementShell.prototype = { return "moz-icon://" + metaData.filePath + "?size=32"; if (this._placesNode) { - // Try to extract an extension from the uri. - let ext = this._downloadURIObj.QueryInterface(Ci.nsIURL).fileExtension; - if (ext) - return "moz-icon://." + ext + "?size=32"; - return this._placesNode.icon || "moz-icon://.unknown?size=32"; + return "moz-icon://.unknown?size=32"; } + + // Assert unreachable. if (this._dataItem) throw new Error("Session-download items should always have a target file uri"); @@ -506,11 +503,6 @@ DownloadElementShell.prototype = { this._fetchTargetFileInfo(true); }, - placesNodeIconChanged: function DES_placesNodeIconChanged() { - if (!this._dataItem) - this._element.setAttribute("image", this._getIcon()); - }, - placesNodeAnnotationChanged: function DES_placesNodeAnnotationChanged(aAnnoName) { this._annotations.delete(aAnnoName); if (!this._dataItem && this.active) { @@ -1244,18 +1236,13 @@ DownloadsPlacesView.prototype = { this._removeHistoryDownloadFromView(aPlacesNode); }, - nodeIconChanged: function DPV_nodeIconChanged(aNode) { - this._forEachDownloadElementShellForURI(aNode.uri, function(aDownloadElementShell) { - aDownloadElementShell.placesNodeIconChanged(); - }); - }, - nodeAnnotationChanged: function DPV_nodeAnnotationChanged(aNode, aAnnoName) { this._forEachDownloadElementShellForURI(aNode.uri, function(aDownloadElementShell) { aDownloadElementShell.placesNodeAnnotationChanged(aAnnoName); }); }, + nodeIconChanged() {}, nodeTitleChanged() {}, nodeKeywordChanged: function() {}, nodeDateAddedChanged: function() {}, |