Bug 1013861: show translation preferences section if ui.show pref == true. r=felipe

This commit is contained in:
Mike de Boer 2014-05-23 17:16:28 +02:00
parent 26f2ac1137
commit 70b7c7e391
3 changed files with 15 additions and 1 deletions

View File

@ -16,6 +16,13 @@ var gContentPane = {
menulist.insertItemAt(0, "", "", "");
menulist.selectedIndex = 0;
}
// Show translation preferences if we may:
const prefName = "browser.translation.ui.show";
if (Services.prefs.getBoolPref(prefName)) {
let row = document.getElementById("translationBox");
row.removeAttribute("hidden");
}
},
// UTILITY FUNCTIONS

View File

@ -143,7 +143,7 @@
accesskey="&chooseButton.accesskey;"
oncommand="gContentPane.showLanguages();"/>
</row>
<row hidden="true">
<row id="translationBox" hidden="true">
<checkbox id="translate" preference="browser.translation.detectLanguage" flex="1"
label="&translateWebPages.label;" accesskey="&translateWebPages.accesskey;"
onsyncfrompreference="return gContentPane.updateButtons('translateButton',

View File

@ -15,6 +15,13 @@ var gContentPane = {
menulist.insertItemAt(0, "", "", "");
menulist.selectedIndex = 0;
}
// Show translation preferences if we may:
const prefName = "browser.translation.ui.show";
if (Services.prefs.getBoolPref(prefName)) {
let row = document.getElementById("translationBox");
row.removeAttribute("hidden");
}
},
// UTILITY FUNCTIONS