mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
bug 79551, r=nhotta, sr=alecf
This commit is contained in:
parent
1f94226bce
commit
0b70dc0cc7
@ -4,7 +4,7 @@ function Startup()
|
||||
var selectedLanguage = window.arguments.length ? window.arguments[0] : null;
|
||||
var tree = document.getElementById("langList");
|
||||
if (selectedLanguage) {
|
||||
var elements = tree.getElementsByAttribute("data", selectedLanguage);
|
||||
var elements = tree.getElementsByAttribute("value", selectedLanguage);
|
||||
if (elements.length)
|
||||
tree.selectItem(elements[0].parentNode.parentNode);
|
||||
}
|
||||
@ -19,7 +19,7 @@ function onOK()
|
||||
var tree = document.getElementById("langList");
|
||||
var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null;
|
||||
if (selectedItem) {
|
||||
var langName = selectedItem.firstChild.firstChild.getAttribute("data");
|
||||
var langName = selectedItem.firstChild.firstChild.getAttribute("value");
|
||||
var langStore = opener.document.getElementById("ProfileLocale");
|
||||
if (langStore)
|
||||
langStore.setAttribute("data", langName);
|
||||
|
@ -31,7 +31,7 @@ function selectLocale(event)
|
||||
chromeRegistry = chromeRegistry.QueryInterface( Components.interfaces.nsIChromeRegistry );
|
||||
}
|
||||
var node = event.target;
|
||||
var langcode = node.getAttribute('data');
|
||||
var langcode = node.getAttribute('value');
|
||||
//var old_lang = chromeRegistry.getSelectedLocale("navigator");
|
||||
//dump("\n-->old_lang=" + old_lang + "--");
|
||||
chromeRegistry.selectLocale(langcode, true);
|
||||
|
Loading…
Reference in New Issue
Block a user