зеркало из https://github.com/mozilla/gecko-dev.git
Bug 345599: label of the 'Clear Now' button in the Privacy pane shouldn't contain ellipsis (...) when set to not ask before clearing. r=mconnor
This commit is contained in:
Родитель
fb232b36e6
Коммит
1bd18f29e6
|
@ -42,7 +42,8 @@
|
|||
var gPrivacyPane = {
|
||||
|
||||
/**
|
||||
* Sets up the UI for the number of days of history to keep.
|
||||
* Sets up the UI for the number of days of history to keep, and updates the
|
||||
label of the "Clear Now..." button.
|
||||
*/
|
||||
init: function ()
|
||||
{
|
||||
|
@ -56,6 +57,8 @@ var gPrivacyPane = {
|
|||
historyDaysCheckbox.addEventListener("CheckboxStateChange",
|
||||
checkboxChanged,
|
||||
false);
|
||||
|
||||
this.updateClearNowButtonLabel();
|
||||
},
|
||||
|
||||
// HISTORY
|
||||
|
@ -240,12 +243,28 @@ var gPrivacyPane = {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Sets the label of the "Clear Now..." button according to the
|
||||
* privacy.sanitize.promptOnSanitize pref.
|
||||
*/
|
||||
updateClearNowButtonLabel: function()
|
||||
{
|
||||
var prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var clearNowButton = document.getElementById("clearDataNow");
|
||||
if (prefBranch.getBoolPref("privacy.sanitize.promptOnSanitize"))
|
||||
clearNowButton.label = clearNowButton.getAttribute("label1"); // "Clear Now..."
|
||||
else
|
||||
clearNowButton.label = clearNowButton.getAttribute("label2"); // "Clear Now"
|
||||
},
|
||||
|
||||
/**
|
||||
* Displays the Clear Private Data settings dialog.
|
||||
*/
|
||||
showClearPrivateDataSettings: function ()
|
||||
{
|
||||
document.documentElement.openSubDialog("chrome://browser/content/preferences/sanitize.xul",
|
||||
"", null);
|
||||
this.updateClearNowButtonLabel();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -164,7 +164,8 @@
|
|||
</hbox>
|
||||
<hbox align="right">
|
||||
<button id="clearDataNow"
|
||||
label="&clearDataNow.label;"
|
||||
label1="&clearDataNow.label;"
|
||||
label2="&clearDataNow.label2;"
|
||||
accesskey="&clearDataNow.accesskey;"
|
||||
oncommand="gPrivacyPane.clearPrivateDataNow();"/>
|
||||
</hbox>
|
||||
|
|
|
@ -45,4 +45,5 @@
|
|||
<!ENTITY clearDataSettings.accesskey "t">
|
||||
|
||||
<!ENTITY clearDataNow.label "Clear Now...">
|
||||
<!ENTITY clearDataNow.label2 "Clear Now">
|
||||
<!ENTITY clearDataNow.accesskey "N">
|
||||
|
|
Загрузка…
Ссылка в новой задаче