From 4dbbc7cd4102b0712f0395c30e2998c96ff910ff Mon Sep 17 00:00:00 2001 From: "pkasting%google.com" Date: Fri, 18 Aug 2006 21:45:38 +0000 Subject: [PATCH] Bug 347956: Import Bookmarks from File broken when no other browsers installed Patch by Adam Guthrie (ispiked@gmail.com) r=gavin checkin OK=mconnor git-svn-id: svn://10.0.0.236/trunk@207872 18797224-902f-48f8-a5cc-f745e15eee43 --- .../browser/components/migration/content/migration.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/browser/components/migration/content/migration.js b/mozilla/browser/components/migration/content/migration.js index e1b9f46e315..9e540553f54 100644 --- a/mozilla/browser/components/migration/content/migration.js +++ b/mozilla/browser/components/migration/content/migration.js @@ -87,11 +87,14 @@ var MigrationWizard = { // 1 - Import Source onImportSourcePageShow: function () { + // Reference to the "From File" radio button + var fromfile = null; + //XXXquark This function is called before init, so check for bookmarks here if ("arguments" in window && window.arguments[0] == "bookmarks") { this._bookmarks = true; - var fromfile = document.getElementById("fromfile"); + fromfile = document.getElementById("fromfile"); fromfile.hidden = false; var importBookmarks = document.getElementById("importBookmarks"); @@ -103,8 +106,9 @@ var MigrationWizard = { this._wiz.canRewind = false; - // The migrator to select - var selectedMigrator = null; + // The migrator to select. If the "fromfile" migrator is available, use it + // as the default in case we have no other migrators. + var selectedMigrator = fromfile; // Figure out what source apps are are available to import from: var group = document.getElementById("importSourceGroup");