Bug 817006 - "Remove from List" option in the Downloads Panel should be clarified as "Remove from History". r=mak.

This commit is contained in:
Mike Conley 2012-12-14 12:51:52 -05:00
parent 3c52b5aa6a
commit 30f0b5af3b
6 changed files with 15 additions and 10 deletions

View File

@ -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) */

View File

@ -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()

View File

@ -68,8 +68,8 @@
accesskey="&cmd.cancel.accesskey;"/>
<menuitem command="cmd_delete"
class="downloadRemoveFromListMenuItem"
label="&cmd.removeFromList.label;"
accesskey="&cmd.removeFromList.accesskey;"/>
label="&cmd.removeFromHistory.label;"
accesskey="&cmd.removeFromHistory.accesskey;"/>
<menuitem command="downloadsCmd_show"
class="downloadShowMenuItem"
#ifdef XP_MACOSX

View File

@ -32,7 +32,7 @@ richlistitem.download {
[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) */
[state="0"], /* Downloading */

View File

@ -484,9 +484,9 @@
label="&cmd.cancel.label;"
accesskey="&cmd.cancel.accesskey;"/>
<menuitem command="cmd_delete"
class="downloadRemoveFromListMenuItem"
label="&cmd.removeFromList.label;"
accesskey="&cmd.removeFromList.accesskey;"/>
class="downloadRemoveFromHistoryMenuItem"
label="&cmd.removeFromHistory.label;"
accesskey="&cmd.removeFromHistory.accesskey;"/>
<menuitem command="downloadsCmd_show"
class="downloadShowMenuItem"
#ifdef XP_MACOSX

View File

@ -60,8 +60,8 @@
<!ENTITY cmd.goToDownloadPage.accesskey "G">
<!ENTITY cmd.copyDownloadLink.label "Copy Download Link">
<!ENTITY cmd.copyDownloadLink.accesskey "L">
<!ENTITY cmd.removeFromList.label "Remove From List">
<!ENTITY cmd.removeFromList.accesskey "e">
<!ENTITY cmd.removeFromHistory.label "Remove From History">
<!ENTITY cmd.removeFromHistory.accesskey "e">
<!ENTITY cmd.clearList.label "Clear List">
<!ENTITY cmd.clearList.accesskey "a">