From ca672df64c09ede4694db988884131d5f9735f84 Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Sat, 29 Jul 2006 05:42:42 +0000 Subject: [PATCH] Bug 206092 New window from Composer/MailNews only opens blank page p=ian@arlen.demon.co.uk r=me sr=jag --- suite/common/tasksOverlay.js | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/suite/common/tasksOverlay.js b/suite/common/tasksOverlay.js index cb413fcd397a..824a7dd54ff7 100644 --- a/suite/common/tasksOverlay.js +++ b/suite/common/tasksOverlay.js @@ -112,35 +112,12 @@ function OpenBrowserWindow() handler = handler.QueryInterface(Components.interfaces.nsICmdLineHandler); var url = handler.chromeUrlForTask; var wintype = document.documentElement.getAttribute('windowtype'); - var startpage; var windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); var browserWin = windowMediator.getMostRecentWindow("navigator:browser"); - // if a browser window already exists then check pref for how new window should be opened - if (browserWin) - { - try { - switch ( pref.getIntPref("browser.windows.loadOnNewWindow") ) - { - case -1: - startpage = handler.defaultArgs; - break; - default: - startpage = "about:blank"; - break; - case 1: - startpage = getHomePage().join("\n"); - break; - case 2: - startpage = getWebNavigation().currentURI.spec; - break; - } - } catch(e) { - startpage = "about:blank"; - } - } else { - startpage = handler.defaultArgs; - } + // if a browser window already exists then set startpage to null so + // navigator.js can check pref for how new window should be opened + var startpage = browserWin ? null : handler.defaultArgs; // if and only if the current window is a browser window and it has a document with a character // set, then extract the current charset menu setting from the current document and use it to