Fix for blocker bug 126507. The fix for 91721 required the removal of the drop-down

box in the Pref/Appearance.  I removed the drop down code but not the code that calls
it when the OK button is pressed.  This fix corrects that. r=sgehani, sr=alecf
This commit is contained in:
dbragg%netscape.com 2006-05-17 02:32:03 +00:00
Родитель ea9d4a2e03
Коммит 0e737046f2
1 изменённых файлов: 1 добавлений и 35 удалений

Просмотреть файл

@ -37,41 +37,7 @@
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-appearance.xul";
// the first elements in this array will be poked from chromeregistry loaded
// overlays once overlays.rdf works properly
var _elementIDs = ["generalStartupBrowser", "showHideTooltips", "useSiteIcons", "languageList"];
function Startup()
{
parent.hPrefWindow.registerOKCallbackFunc( switchUILanguage );
}
function switchUILanguage()
{
var oldLangCode = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.locale");
var newLangCode;
try {
var languageList = document.getElementById('languageList');
newLangCode = languageList ?
languageList.selectedItem.value :
parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-appearance.xul", "languageList" ).value;
}
catch (e) {}
if (newLangCode != oldLangCode) {
try {
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"].getService(Components.interfaces.nsIChromeRegistry);
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
chromeRegistry.selectLocale(newLangCode, true);
observerService.notifyObservers(null, "locale-selected", null);
}
catch(e) {
return false;
}
}
return true;
}
var _elementIDs = ["generalStartupBrowser", "showHideTooltips", "useSiteIcons"];
]]>
</script>