Bug 735471 - Add a pref to switch between window'd preferences and in-content preferences. r=jaws,bmcbride

This commit is contained in:
Devan Sayles
2012-05-08 19:31:51 -07:00
parent f7434dad33
commit 95a8bb58e7
5 changed files with 109 additions and 23 deletions

View File

@@ -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)