зеркало из https://github.com/mozilla/gecko-dev.git
Bug 287615 - move openPreferences() to utilityOverlay. r=mconnor
This commit is contained in:
Родитель
e0c32746fe
Коммит
59c0a35138
|
@ -3701,21 +3701,6 @@ function asyncFocusSearchBox(event)
|
|||
sidebar.removeEventListener("load", asyncFocusSearchBox, true);
|
||||
}
|
||||
|
||||
function openPreferences()
|
||||
{
|
||||
var instantApply = gPrefService.getBoolPref("browser.preferences.instantApply");
|
||||
var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
|
||||
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var win = wm.getMostRecentWindow("Browser:Preferences");
|
||||
if (win)
|
||||
win.focus();
|
||||
else
|
||||
openDialog("chrome://browser/content/preferences/preferences.xul",
|
||||
"Preferences", features);
|
||||
}
|
||||
|
||||
var gHomeButton = {
|
||||
prefDomain: "browser.startup.homepage",
|
||||
observe: function (aSubject, aTopic, aPrefName)
|
||||
|
|
|
@ -411,3 +411,18 @@ function openAboutDialog()
|
|||
window.openDialog("chrome://browser/content/aboutDialog.xul", "About", "modal,centerscreen,chrome,resizable=no");
|
||||
#endif
|
||||
}
|
||||
|
||||
function openPreferences()
|
||||
{
|
||||
var instantApply = getBoolPref("browser.preferences.instantApply", false);
|
||||
var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
|
||||
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var win = wm.getMostRecentWindow("Browser:Preferences");
|
||||
if (win)
|
||||
win.focus();
|
||||
else
|
||||
openDialog("chrome://browser/content/preferences/preferences.xul",
|
||||
"Preferences", features);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче