Bug 745508 - Remove unused "From an HTML File" mode from the migration wizard. r=mak. a=desktop-only

This commit is contained in:
Asaf Romano 2012-04-23 15:31:16 -04:00
parent 62fc1ce083
commit 99b69df640
3 changed files with 3 additions and 36 deletions

View File

@ -18,7 +18,6 @@ var MigrationWizard = {
_wiz: null,
_migrator: null,
_autoMigrate: null,
_bookmarks: false,
init: function ()
{
@ -64,34 +63,15 @@ var MigrationWizard = {
// 1 - Import Source
onImportSourcePageShow: function ()
{
// Reference to the "From File" radio button
var fromfile = null;
// init is not called when openDialog opens the wizard, so check for bookmarks here.
if ("arguments" in window && window.arguments[0] == "bookmarks") {
this._bookmarks = true;
fromfile = document.getElementById("fromfile");
fromfile.hidden = false;
var importBookmarks = document.getElementById("importBookmarks");
importBookmarks.hidden = false;
var importAll = document.getElementById("importAll");
importAll.hidden = true;
}
this._wiz.canRewind = false;
// 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;
var selectedMigrator = null;
// Figure out what source apps are are available to import from:
var group = document.getElementById("importSourceGroup");
for (var i = 0; i < group.childNodes.length; ++i) {
var migratorKey = group.childNodes[i].id;
if (migratorKey != "nothing" && migratorKey != "fromfile") {
if (migratorKey != "nothing") {
var migrator = MigrationUtils.getMigrator(migratorKey);
if (migrator) {
// Save this as the first selectable item, if we don't already have
@ -128,9 +108,7 @@ var MigrationWizard = {
{
var newSource = document.getElementById("importSourceGroup").selectedItem.id;
if (newSource == "nothing" || newSource == "fromfile") {
if(newSource == "fromfile")
window.opener.fromFile = true;
if (newSource == "nothing") {
document.documentElement.cancel();
return false;
}
@ -152,8 +130,6 @@ var MigrationWizard = {
else {
if (this._autoMigrate)
this._wiz.currentPage.next = "homePageImport";
else if (this._bookmarks)
this._wiz.currentPage.next = "migrating"
else
this._wiz.currentPage.next = "importItems";
@ -205,8 +181,6 @@ var MigrationWizard = {
// If we're automigrating or just doing bookmarks don't show the item selection page
if (this._autoMigrate)
this._wiz.currentPage.next = "homePageImport";
else if (this._bookmarks)
this._wiz.currentPage.next = "migrating"
},
// 3 - ImportItems
@ -352,10 +326,6 @@ var MigrationWizard = {
if (this._autoMigrate)
this._itemsFlags = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
// When importing bookmarks, show only bookmarks
if (this._bookmarks)
this._itemsFlags = 32;
this._listItems("migratingItems");
setTimeout(this.onMigratingMigrate, 0, this);
},

View File

@ -71,7 +71,6 @@
<radio id="ie" label="&importFromIE.label;" accesskey="&importFromIE.accesskey;"/>
<radio id="chrome" label="&importFromChrome.label;" accesskey="&importFromChrome.accesskey;"/>
<radio id="firefox" label="&importFromFirefox.label;" accesskey="&importFromFirefox.accesskey;"/>
<radio id="fromfile" label="&importFromHTMLFile.label;" accesskey="&importFromHTMLFile.accesskey;" hidden="true"/>
<radio id="nothing" label="&importFromNothing.label;" accesskey="&importFromNothing.accesskey;" hidden="true"/>
</radiogroup>
<label id="noSources" hidden="true">&noMigrationSources.label;</label>

View File

@ -15,8 +15,6 @@
<!ENTITY importFromChrome.accesskey "C">
<!ENTITY importFromFirefox.label "Firefox">
<!ENTITY importFromFirefox.accesskey "X">
<!ENTITY importFromHTMLFile.label "From an HTML File">
<!ENTITY importFromHTMLFile.accesskey "F">
<!ENTITY noMigrationSources.label "No programs that contain bookmarks, history or password data could be found.">