From 39d6430f1488a5d39e8f89c28f78bc38f147c4ad Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Wed, 28 Sep 2005 04:20:07 +0000 Subject: [PATCH] Bug 310156 - File->Import doesn't focus migration wizard if it's already opened. r=mconnor. --- browser/base/content/browser.js | 14 +++++++++++--- browser/components/migration/content/migration.xul | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 3d8ff02a456..50be1dc89c1 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -2309,11 +2309,19 @@ function updateToolbarStates(toolbarMenuElt) function BrowserImport() { #ifdef XP_MACOSX - var features = "centerscreen,chrome,resizable=no"; + var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] + .getService(Components.interfaces.nsIWindowMediator); + var win = wm.getMostRecentWindow("Browser:MigrationWizard"); + if (win) + win.focus(); + else { + window.openDialog("chrome://browser/content/migration/migration.xul", + "migration", "centerscreen,chrome,resizable=no"); + } #else - var features = "modal,centerscreen,chrome,resizable=no"; + window.openDialog("chrome://browser/content/migration/migration.xul", + "migration", "modal,centerscreen,chrome,resizable=no"); #endif - window.openDialog("chrome://browser/content/migration/migration.xul", "migration", features); } function BrowserFullScreen() diff --git a/browser/components/migration/content/migration.xul b/browser/components/migration/content/migration.xul index 3595dbda3cf..6959a74d56d 100644 --- a/browser/components/migration/content/migration.xul +++ b/browser/components/migration/content/migration.xul @@ -41,6 +41,7 @@