Bug 735471 - Add a pref to switch between window'd preferences and in-content preferences. r=jaws,bmcbride
This commit is contained in:
@@ -495,27 +495,31 @@ function openAboutDialog() {
|
||||
|
||||
function openPreferences(paneID, extraArgs)
|
||||
{
|
||||
var instantApply = getBoolPref("browser.preferences.instantApply", false);
|
||||
var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
|
||||
if (Services.prefs.getBoolPref("browser.preferences.inContent")) {
|
||||
openUILinkIn("about:preferences", "tab");
|
||||
} else {
|
||||
var instantApply = getBoolPref("browser.preferences.instantApply", false);
|
||||
var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
|
||||
|
||||
var win = Services.wm.getMostRecentWindow("Browser:Preferences");
|
||||
if (win) {
|
||||
win.focus();
|
||||
if (paneID) {
|
||||
var pane = win.document.getElementById(paneID);
|
||||
win.document.documentElement.showPane(pane);
|
||||
var win = Services.wm.getMostRecentWindow("Browser:Preferences");
|
||||
if (win) {
|
||||
win.focus();
|
||||
if (paneID) {
|
||||
var pane = win.document.getElementById(paneID);
|
||||
win.document.documentElement.showPane(pane);
|
||||
}
|
||||
|
||||
if (extraArgs && extraArgs["advancedTab"]) {
|
||||
var advancedPaneTabs = win.document.getElementById("advancedPrefs");
|
||||
advancedPaneTabs.selectedTab = win.document.getElementById(extraArgs["advancedTab"]);
|
||||
}
|
||||
|
||||
return win;
|
||||
}
|
||||
|
||||
if (extraArgs && extraArgs["advancedTab"]) {
|
||||
var advancedPaneTabs = win.document.getElementById("advancedPrefs");
|
||||
advancedPaneTabs.selectedTab = win.document.getElementById(extraArgs["advancedTab"]);
|
||||
}
|
||||
|
||||
return win;
|
||||
return openDialog("chrome://browser/content/preferences/preferences.xul",
|
||||
"Preferences", features, paneID, extraArgs);
|
||||
}
|
||||
|
||||
return openDialog("chrome://browser/content/preferences/preferences.xul",
|
||||
"Preferences", features, paneID, extraArgs);
|
||||
}
|
||||
|
||||
function openAdvancedPreferences(tabID)
|
||||
|
||||
Reference in New Issue
Block a user