From f2a1bd2c27035e879018a029e8997edb6fd7d2da 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. git-svn-id: svn://10.0.0.236/trunk@181107 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser.js | 14 +++++++++++--- .../components/migration/content/migration.xul | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 3d8ff02a456..50be1dc89c1 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/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/mozilla/browser/components/migration/content/migration.xul b/mozilla/browser/components/migration/content/migration.xul index 3595dbda3cf..6959a74d56d 100644 --- a/mozilla/browser/components/migration/content/migration.xul +++ b/mozilla/browser/components/migration/content/migration.xul @@ -41,6 +41,7 @@