From f0a9156c449d7fb2122947d5a9e725746d894792 Mon Sep 17 00:00:00 2001 From: "mkmelin+mozilla%iki.fi" Date: Tue, 17 Jun 2008 18:13:16 +0000 Subject: [PATCH] Bug 438050: default client dialog comes up in before all other windows, placed at 0,0 r=philringnalda git-svn-id: svn://10.0.0.236/trunk@252408 18797224-902f-48f8-a5cc-f745e15eee43 --- .../mail/base/content/msgMail3PaneWindow.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mozilla/mail/base/content/msgMail3PaneWindow.js b/mozilla/mail/base/content/msgMail3PaneWindow.js index b5578740e5e..c2bbc5ad1bc 100644 --- a/mozilla/mail/base/content/msgMail3PaneWindow.js +++ b/mozilla/mail/base/content/msgMail3PaneWindow.js @@ -22,7 +22,7 @@ # # Contributor(s): # Jan Varga (varga@nixcorp.com) -# Håkan Waara (hwaara@chello.se) +# HÃ¥kan Waara (hwaara@chello.se) # Neil Rashbrook (neil@parkwaycc.co.uk) # Seth Spitzer # David Bienvenu @@ -813,13 +813,19 @@ function OnLoadMessenger() defaultAccount = accountManager.defaultAccount; } catch (ex) {} - // show the default client dialog only if we have at least one account, - // if we should check for the default client, - // and we aren't already the default for mail) + function showDefaultClientDialog() { + window.openDialog("chrome://messenger/content/defaultClientDialog.xul", + "DefaultClient", "modal,centerscreen,chrome,resizable=no"); + } + + // Show the default client dialog only if we have at least one account, + // we should check for the default client, and we aren't already the default + // for mail. + // Needs to be shown outside the he normal load sequence so it doesn't appear + // before any other displays, in the wrong place of the screen. if (shellService && defaultAccount && shellService.shouldCheckDefaultClient && !shellService.isDefaultClient(true, nsIShellService.MAIL)) - window.openDialog("chrome://messenger/content/defaultClientDialog.xul", "DefaultClient", - "modal,centerscreen,chrome,resizable=no"); + setTimeout(showDefaultClientDialog, 0); #endif // FIX ME - later we will be able to use onload from the overlay