зеркало из https://github.com/mozilla/pjs.git
Bug 300590 - Expose bidi.browser.ui, seamonkey part. r+sr=neil.
This commit is contained in:
Родитель
7c04e09956
Коммит
89e6a4d24b
|
@ -253,3 +253,7 @@ pref("browser.urlbar.clickSelectsAll", false);
|
|||
pref("browser.backspace_action", 1);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Setting this pref to |true| forces BiDi UI menu items and keyboard shortcuts
|
||||
// to be exposed. By default, only expose it for bidi-associated system locales.
|
||||
pref("bidi.browser.ui", false);
|
||||
|
|
|
@ -2648,17 +2648,14 @@ function isBidiEnabled()
|
|||
var systemLocale;
|
||||
try {
|
||||
var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
|
||||
.getService(Components.interfaces.nsILocaleService);
|
||||
.getService(Components.interfaces.nsILocaleService);
|
||||
systemLocale = localeService.getSystemLocale().getCategory("NSILOCALE_CTYPE");
|
||||
rv = /^(he|ar|syr|fa|ur)-/.test(systemLocale);
|
||||
} catch (e) {}
|
||||
|
||||
if (!rv) {
|
||||
// check the overriding pref
|
||||
try {
|
||||
rv = pref.getBoolPref("bidi.browser.ui");
|
||||
}
|
||||
catch (e) {}
|
||||
rv = pref.getBoolPref("bidi.browser.ui");
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче