summaryrefslogtreecommitdiffstats
path: root/browser/components/preferences
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-26 16:46:59 +0200
committerGitHub <noreply@github.com>2018-04-26 16:46:59 +0200
commit9a97c58feb8f14bb8be720e2cac5db017b4523d3 (patch)
tree8239115c3d04da51a628f166c9896cba3bb6dde6 /browser/components/preferences
parent698b659ee29fd84b02ac2632085d31caaef081e9 (diff)
parentf506d6fcaad26464b75338630a7d3a0078029eba (diff)
downloadUXP-9a97c58feb8f14bb8be720e2cac5db017b4523d3.tar
UXP-9a97c58feb8f14bb8be720e2cac5db017b4523d3.tar.gz
UXP-9a97c58feb8f14bb8be720e2cac5db017b4523d3.tar.lz
UXP-9a97c58feb8f14bb8be720e2cac5db017b4523d3.tar.xz
UXP-9a97c58feb8f14bb8be720e2cac5db017b4523d3.zip
Merge pull request #269 from adeshkp/button_messages
Improve some button labels in preferences
Diffstat (limited to 'browser/components/preferences')
-rw-r--r--browser/components/preferences/cookies.js19
-rw-r--r--browser/components/preferences/cookies.xul2
2 files changed, 17 insertions, 4 deletions
diff --git a/browser/components/preferences/cookies.js b/browser/components/preferences/cookies.js
index 1042642da..921eee4c0 100644
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -30,6 +30,11 @@ var gCookiesWindow = {
this._bundle = document.getElementById("bundlePreferences");
this._tree = document.getElementById("cookiesList");
+ let removeAllCookies = document.getElementById("removeAllCookies");
+ removeAllCookies.setAttribute("accesskey", this._bundle.getString("removeAllCookies.accesskey"));
+ let removeSelectedCookies = document.getElementById("removeSelectedCookies");
+ removeSelectedCookies.setAttribute("accesskey", this._bundle.getString("removeSelectedCookies.accesskey"));
+
this._populateList(true);
document.getElementById("filter").focus();
@@ -582,7 +587,7 @@ var gCookiesWindow = {
}
}
- let buttonLabel = this._bundle.getString("removeSelectedCookies");
+ let buttonLabel = this._bundle.getString("removeSelectedCookies.label");
let removeSelectedCookies = document.getElementById("removeSelectedCookies");
removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel)
.replace("#1", selectedCookieCount);
@@ -894,7 +899,17 @@ var gCookiesWindow = {
},
_updateRemoveAllButton: function gCookiesWindow__updateRemoveAllButton() {
- document.getElementById("removeAllCookies").disabled = this._view._rowCount == 0;
+ let removeAllCookies = document.getElementById("removeAllCookies");
+ removeAllCookies.disabled = this._view._rowCount == 0;
+
+ let labelStringID = "removeAllCookies.label";
+ let accessKeyStringID = "removeAllCookies.accesskey";
+ if (this._view._filtered) {
+ labelStringID = "removeAllShownCookies.label";
+ accessKeyStringID = "removeAllShownCookies.accesskey";
+ }
+ removeAllCookies.setAttribute("label", this._bundle.getString(labelStringID));
+ removeAllCookies.setAttribute("accesskey", this._bundle.getString(accessKeyStringID));
},
filter: function () {
diff --git a/browser/components/preferences/cookies.xul b/browser/components/preferences/cookies.xul
index cda6ea220..bd60d9346 100644
--- a/browser/components/preferences/cookies.xul
+++ b/browser/components/preferences/cookies.xul
@@ -96,10 +96,8 @@
<hbox align="end">
<hbox class="actionButtons" flex="1">
<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;"
oncommand="gCookiesWindow.deleteAllCookies();"/>
<spacer flex="1"/>
#ifndef XP_MACOSX