diff --git a/browser/components/downloads/content/downloads.css b/browser/components/downloads/content/downloads.css index e8f1b1ecc5ad..5b60eebadbd9 100644 --- a/browser/components/downloads/content/downloads.css +++ b/browser/components/downloads/content/downloads.css @@ -54,7 +54,7 @@ richlistitem[type="download"]:not([selected]) button { [state="6"], /* Blocked (parental) */ [state="8"], /* Blocked (dirty) */ [state="9"]) /* Blocked (policy) */) - .downloadRemoveFromListMenuItem, + .downloadRemoveFromHistoryMenuItem, .download-state:not(:-moz-any([state="-1"],/* Starting (initial) */ [state="5"], /* Starting (queued) */ diff --git a/browser/components/downloads/content/downloads.js b/browser/components/downloads/content/downloads.js index fd6efefec163..dacee661a89f 100644 --- a/browser/components/downloads/content/downloads.js +++ b/browser/components/downloads/content/downloads.js @@ -46,6 +46,10 @@ XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", "resource:///modules/DownloadsCommon.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", + "resource://gre/modules/PlacesUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", + "resource://gre/modules/NetUtil.jsm"); //////////////////////////////////////////////////////////////////////////////// //// DownloadsPanel @@ -335,7 +339,7 @@ const DownloadsPanel = { return; } - let uri = Services.io.newURI(url, null, null); + let uri = NetUtil.newURI(url); saveURL(uri.spec, name || uri.spec, null, true, true, undefined, document); } catch (ex) {} @@ -1239,6 +1243,7 @@ DownloadsViewItemController.prototype = { cmd_delete: function DVIC_cmd_delete() { this.dataItem.remove(); + PlacesUtils.bhistory.removePage(NetUtil.newURI(this.dataItem.uri)); }, downloadsCmd_cancel: function DVIC_downloadsCmd_cancel() diff --git a/browser/components/downloads/content/downloadsOverlay.xul b/browser/components/downloads/content/downloadsOverlay.xul index 72e5585c518a..1b19889ad1f0 100644 --- a/browser/components/downloads/content/downloadsOverlay.xul +++ b/browser/components/downloads/content/downloadsOverlay.xul @@ -68,8 +68,8 @@ accesskey="&cmd.cancel.accesskey;"/> + label="&cmd.removeFromHistory.label;" + accesskey="&cmd.removeFromHistory.accesskey;"/> + class="downloadRemoveFromHistoryMenuItem" + label="&cmd.removeFromHistory.label;" + accesskey="&cmd.removeFromHistory.accesskey;"/> - - + +