diff --git a/mozilla/mail/base/content/mailCore.js b/mozilla/mail/base/content/mailCore.js index 936a126dcd0..2efa9f9b1cc 100644 --- a/mozilla/mail/base/content/mailCore.js +++ b/mozilla/mail/base/content/mailCore.js @@ -138,7 +138,8 @@ function CheckOnline() return true; } -function openOptionsDialog(containerID, paneURL, itemID) +// aPaneID +function openOptionsDialog(aPaneID, aTabID) { var prefsService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null) var instantApply = prefsService.getBoolPref("browser.preferences.instantApply"); @@ -149,9 +150,20 @@ function openOptionsDialog(containerID, paneURL, itemID) var win = wm.getMostRecentWindow("Mail:Preferences"); if (win) + { win.focus(); + if (aPaneID) + { + var pane = win.document.getElementById(aPaneID); + win.document.documentElement.showPane(pane); + + // I don't know how to support aTabID for an arbitrary panel when the dialog is already open + // This is complicated because showPane is asynchronous (it could trigger a dynamic overlay) + // so our tab element may not be accessible right away... + } + } else - openDialog("chrome://messenger/content/preferences/preferences.xul","Preferences", features); + openDialog("chrome://messenger/content/preferences/preferences.xul","Preferences", features, aPaneID, aTabID); } function openExtensions(aOpenMode) diff --git a/mozilla/mail/components/addrbook/content/addressbook.xul b/mozilla/mail/components/addrbook/content/addressbook.xul index aeeb55f8ff3..dc63d1be178 100644 --- a/mozilla/mail/components/addrbook/content/addressbook.xul +++ b/mozilla/mail/components/addrbook/content/addressbook.xul @@ -324,7 +324,7 @@ #ifndef XP_MACOSX + oncommand="openOptionsDialog()"/> #endif #endif @@ -463,11 +463,11 @@ #ifndef XP_UNIX + oncommand="openOptionsDialog()"/> #else #ifdef XP_MACOSX + oncommand="openOptionsDialog()"/> #endif #endif diff --git a/mozilla/mail/components/compose/content/messengercompose.xul b/mozilla/mail/components/compose/content/messengercompose.xul index 0b2264555d0..983e70df181 100644 --- a/mozilla/mail/components/compose/content/messengercompose.xul +++ b/mozilla/mail/components/compose/content/messengercompose.xul @@ -355,7 +355,7 @@ + oncommand="openOptionsDialog('paneCompose');"/> #endif #endif @@ -512,12 +512,12 @@ + oncommand="openOptionsDialog('paneCompose');"/> #else #ifdef XP_MACOSX + oncommand="openOptionsDialog('paneCompose');"/> #endif #endif diff --git a/mozilla/mail/components/preferences/advanced.js b/mozilla/mail/components/preferences/advanced.js index 7ab775974f6..2718d1d13b2 100644 --- a/mozilla/mail/components/preferences/advanced.js +++ b/mozilla/mail/components/preferences/advanced.js @@ -43,9 +43,14 @@ var gAdvancedPane = { this.mPane = document.getElementById("paneAdvanced"); this.updateMarkAsReadTextbox(false); - var preference = document.getElementById("mail.preferences.advanced.selectedTabIndex"); - if (preference.value) - document.getElementById("advancedPrefs").selectedIndex = preference.value; + if ("arguments" in window && window.arguments[1] && document.getElementById(window.arguments[1])) + document.getElementById("advancedPrefs").selectedTab = document.getElementById(window.arguments[1]); + else + { + var preference = document.getElementById("mail.preferences.advanced.selectedTabIndex"); + if (preference.value) + document.getElementById("advancedPrefs").selectedIndex = preference.value; + } this.mInitialized = true; }, diff --git a/mozilla/mail/components/preferences/advanced.xul b/mozilla/mail/components/preferences/advanced.xul index 178065064ad..27624135276 100644 --- a/mozilla/mail/components/preferences/advanced.xul +++ b/mozilla/mail/components/preferences/advanced.xul @@ -73,7 +73,7 @@ - + diff --git a/mozilla/mail/extensions/offline/content/msgOfflineOverlay.xul b/mozilla/mail/extensions/offline/content/msgOfflineOverlay.xul index f696db66d93..ed7b8e84b91 100644 --- a/mozilla/mail/extensions/offline/content/msgOfflineOverlay.xul +++ b/mozilla/mail/extensions/offline/content/msgOfflineOverlay.xul @@ -63,7 +63,7 @@ - +