Merge f-t to m-c, a=merge

This commit is contained in:
Phil Ringnalda 2014-12-28 10:48:47 -08:00
commit 91b1e32f3c
5 changed files with 18 additions and 21 deletions

View File

@ -5,6 +5,8 @@
const nsICookie = Components.interfaces.nsICookie;
Components.utils.import("resource://gre/modules/PluralForm.jsm");
var gCookiesWindow = {
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager),
@ -551,12 +553,11 @@ var gCookiesWindow = {
if (item && seln.count == 1 && item.container && item.open)
selectedCookieCount += 2;
var removeCookie = document.getElementById("removeCookie");
var removeCookies = document.getElementById("removeCookies");
removeCookie.parentNode.selectedPanel =
selectedCookieCount == 1 ? removeCookie : removeCookies;
let buttonLabel = this._bundle.getString("removeSelectedCookies");
let removeSelectedCookies = document.getElementById("removeSelectedCookies");
removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel);
removeCookie.disabled = removeCookies.disabled = !(seln.count > 0);
removeSelectedCookies.disabled = !(seln.count > 0);
},
performDeletion: function gCookiesWindow_performDeletion(deleteItems) {

View File

@ -92,16 +92,11 @@
</vbox>
<hbox align="end">
<hbox class="actionButtons" flex="1">
<deck oncommand="gCookiesWindow.deleteCookie();">
<button id="removeCookie" disabled="true" icon="remove"
label="&button.removecookie.label;"
accesskey="&button.removecookie.accesskey;"/>
<button id="removeCookies" disabled="true" icon="remove"
label="&button.removecookies.label;"
accesskey="&button.removecookie.accesskey;"/>
</deck>
<button id="removeSelectedCookies" disabled="true" icon="clear"
accesskey="&button.removeSelectedCookies.accesskey;"
oncommand="gCookiesWindow.deleteCookie();"/>
<button id="removeAllCookies" disabled="true" icon="clear"
label="&button.removeallcookies.label;" accesskey="&button.removeallcookies.accesskey;"
label="&button.removeAllCookies.label;" accesskey="&button.removeAllCookies.accesskey;"
oncommand="gCookiesWindow.deleteAllCookies();"/>
<spacer flex="1"/>
#ifndef XP_MACOSX

View File

@ -81,7 +81,7 @@ function runTest(win, searchTerm, cookies, matches) {
// select first cookie and delete
var tree = win.document.getElementById("cookiesList");
var deleteButton = win.document.getElementById("removeCookie");
var deleteButton = win.document.getElementById("removeSelectedCookies");
var rect = tree.treeBoxObject.getCoordsForCellItem(0, tree.columns[0], "cell");
EventUtils.synthesizeMouse(tree.body, rect.x + rect.width / 2, rect.y + rect.height / 2, {}, win);
EventUtils.synthesizeMouseAtCenter(deleteButton, {}, win);
@ -91,7 +91,6 @@ function runTest(win, searchTerm, cookies, matches) {
// select two adjacent cells and delete
EventUtils.synthesizeMouse(tree.body, rect.x + rect.width / 2, rect.y + rect.height / 2, {}, win);
deleteButton = win.document.getElementById("removeCookies");
var eventObj = {};
if (navigator.platform.indexOf("Mac") >= 0)
eventObj.metaKey = true;

View File

@ -7,11 +7,9 @@
<!ENTITY cookiesonsystem.label "The following cookies are stored on your computer:">
<!ENTITY cookiename.label "Cookie Name">
<!ENTITY cookiedomain.label "Site">
<!ENTITY button.removecookies.label "Remove Cookies">
<!ENTITY button.removecookie.label "Remove Cookie">
<!ENTITY button.removecookie.accesskey "R">
<!ENTITY button.removeallcookies.label "Remove All Cookies">
<!ENTITY button.removeallcookies.accesskey "A">
<!ENTITY button.removeSelectedCookies.accesskey "R">
<!ENTITY button.removeAllCookies.label "Remove All">
<!ENTITY button.removeAllCookies.accesskey "A">
<!ENTITY props.name.label "Name:">
<!ENTITY props.value.label "Content:">

View File

@ -92,6 +92,10 @@ cannot=Block
noCookieSelected=<no cookie selected>
cookiesAll=The following cookies are stored on your computer:
cookiesFiltered=The following cookies match your search:
# LOCALIZATION NOTE (removeSelectedCookies):
# Semicolon-separated list of plural forms. See:
# http://developer.mozilla.org/en/docs/Localization_and_Plurals
removeSelectedCookies=Remove Selected;Remove Selected
#### Offline apps
offlineAppsList.height=7em