mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 134290. Unable to switch locale packs, fallout from the outliner to tree landing. Patch by Robert Kaiser <kairo@kairo.at>, r=tao, sr=hewitt, a=brendan
This commit is contained in:
parent
e95bf883e6
commit
d23d4e4ca6
@ -79,7 +79,7 @@
|
|||||||
if (listbox) {
|
if (listbox) {
|
||||||
var selectedItem = listbox.selectedItems.length ? listbox.selectedItems[0] : null;
|
var selectedItem = listbox.selectedItems.length ? listbox.selectedItems[0] : null;
|
||||||
if (selectedItem) {
|
if (selectedItem) {
|
||||||
newContentPack = selectedItem.firstChild.firstChild.getAttribute("value");
|
newContentPack = selectedItem.getAttribute("value");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newContentPack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "contentPackList" ).prefvalue;
|
newContentPack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "contentPackList" ).prefvalue;
|
||||||
@ -117,7 +117,7 @@
|
|||||||
if (languageList) {
|
if (languageList) {
|
||||||
var selectedItem = languageList.selectedItems.length ? languageList.selectedItems[0] : null;
|
var selectedItem = languageList.selectedItems.length ? languageList.selectedItems[0] : null;
|
||||||
if (selectedItem) {
|
if (selectedItem) {
|
||||||
newLanguagePack = selectedItem.firstChild.firstChild.getAttribute("value");
|
newLanguagePack = selectedItem.getAttribute("value");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newLanguagePack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "languagePackList" ).prefvalue;
|
newLanguagePack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "languagePackList" ).prefvalue;
|
||||||
@ -144,13 +144,13 @@
|
|||||||
var selectedItem = listbox.selectedItems.length ? listbox.selectedItems[0] : null;
|
var selectedItem = listbox.selectedItems.length ? listbox.selectedItems[0] : null;
|
||||||
|
|
||||||
if (selectedItem) {
|
if (selectedItem) {
|
||||||
var classType = selectedItem.firstChild.firstChild.getAttribute("class");
|
var classType = selectedItem.getAttribute("class");
|
||||||
if (classType == "outofdate") {
|
if (classType == "outofdate") {
|
||||||
//Make it so that out of date content packs cannot be selected by the user
|
//Make it so that out of date content packs cannot be selected by the user
|
||||||
listbox.removeItemFromSelection(selectedItem);
|
listbox.removeItemFromSelection(selectedItem);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var regionName = selectedItem.firstChild.firstChild.getAttribute("value");
|
var regionName = selectedItem.getAttribute("value");
|
||||||
listbox.setAttribute("prefvalue", regionName);
|
listbox.setAttribute("prefvalue", regionName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -162,13 +162,13 @@
|
|||||||
var selectedItem = listbox.selectedItems.length ? listbox.selectedItems[0] : null;
|
var selectedItem = listbox.selectedItems.length ? listbox.selectedItems[0] : null;
|
||||||
|
|
||||||
if (selectedItem) {
|
if (selectedItem) {
|
||||||
var classType = selectedItem.firstChild.firstChild.getAttribute("class");
|
var classType = selectedItem.getAttribute("class");
|
||||||
if (classType == "outofdate") {
|
if (classType == "outofdate") {
|
||||||
//Make it so that out of date language packs cannot be selected by the user
|
//Make it so that out of date language packs cannot be selected by the user
|
||||||
listbox.removeItemFromSelection(selectedItem);
|
listbox.removeItemFromSelection(selectedItem);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var languageName = selectedItem.firstChild.firstChild.getAttribute("value");
|
var languageName = selectedItem.getAttribute("value");
|
||||||
listbox.setAttribute("prefvalue", languageName);
|
listbox.setAttribute("prefvalue", languageName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -260,4 +260,3 @@
|
|||||||
oncommand="DownloadRegionPacks()"/>
|
oncommand="DownloadRegionPacks()"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</page>
|
</page>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user