Bug 592252 - Restart is required when pressing the down arrow in localization and autodetect is selected already [r=mbrubeck]

This commit is contained in:
Mark Finkle 2010-10-13 09:44:31 -04:00
Родитель 53980cd787
Коммит d24256de26
2 изменённых файлов: 14 добавлений и 3 удалений

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

@ -1493,6 +1493,15 @@
MenuListHelperUI.show(this);
]]>
</handler>
<handler event="command" phase="capturing">
<![CDATA[
// The dropmark (button) fires a command event too. Don't forward that.
// Just forward the menuitem command events, which the toolkit version does.
if (event.target.parentNode.parentNode != this)
event.stopPropagation();
]]>
</handler>
</handlers>
</binding>

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

@ -159,10 +159,12 @@ var PreferencesView = {
catch (e) {}
// Highlight current locale (or auto-detect entry)
if (autoDetect)
if (autoDetect) {
this._languages.selectedItem = document.getElementById("prefs-languages-auto");
else
this._currentLocale = "auto";
} else {
this._languages.selectedItem = selectedItem;
}
// Hide the setting if we only have one locale
if (localeCount == 1)
@ -173,7 +175,7 @@ var PreferencesView = {
// Which locale did the user select?
let newLocale = this._languages.selectedItem.value;
let prefs = Services.prefs;
if (newLocale == "auto") {
if (prefs.prefHasUserValue("general.useragent.locale"))
prefs.clearUserPref("general.useragent.locale");