246018 - Firefox imports IE bookmarks over old bookmarks

237732 - user.js not copied by phoenix profile migrator
240136 - Firefox should not auto-import settings without user confirmation
This commit is contained in:
ben%bengoodger.com 2004-06-10 06:28:27 +00:00
Родитель 6e6b530655
Коммит 7c21f21169
5 изменённых файлов: 38 добавлений и 11 удалений

Просмотреть файл

@ -24,8 +24,13 @@ var MigrationWizard = {
this._migrator = window.arguments[1].QueryInterface(kIMig);
this._autoMigrate = true;
// Advance past the first page
this._wiz.advance();
// Show the "nothing" option in the automigrate case to provide an
// easily identifiable way to avoid migration and create a new profile.
var nothing = document.getElementById("nothing");
nothing.hidden = false;
var phoenix = document.getElementById("phoenix");
phoenix.hidden = false;
}
},
@ -47,10 +52,12 @@ var MigrationWizard = {
var group = document.getElementById("importSourceGroup");
for (var i = 0; i < group.childNodes.length; ++i) {
var suffix = group.childNodes[i].id;
var contractID = kProfileMigratorContractIDPrefix + suffix;
var migrator = Components.classes[contractID].createInstance(kIMig);
if (!migrator.sourceExists)
group.childNodes[i].disabled = true;
if (suffix != "nothing") {
var contractID = kProfileMigratorContractIDPrefix + suffix;
var migrator = Components.classes[contractID].createInstance(kIMig);
if (!migrator.sourceExists)
group.childNodes[i].disabled = true;
}
}
var firstNonDisabled = null;
@ -68,7 +75,12 @@ var MigrationWizard = {
{
var newSource = document.getElementById("importSourceGroup").selectedItem.id;
if (!this._migrator || (!this._autoMigrate && newSource != this._source)) {
if (newSource == "nothing") {
document.documentElement.cancel();
return;
}
if (!this._migrator || (newSource != this._source)) {
// Create the migrator for the selected source.
var contractID = kProfileMigratorContractIDPrefix + newSource;
this._migrator = Components.classes[contractID].createInstance(kIMig);
@ -97,8 +109,10 @@ var MigrationWizard = {
// 2 - [Profile Selection]
onSelectProfilePageShow: function ()
{
if (this._autoMigrate)
document.documentElement.getButton("back").disabled = true;
// Disabling this for now, since we ask about import sources in automigration
// too and don't want to disable the back button
// if (this._autoMigrate)
// document.documentElement.getButton("back").disabled = true;
var profiles = document.getElementById("profiles");
while (profiles.hasChildNodes())

Просмотреть файл

@ -62,6 +62,7 @@
#endif
<radiogroup id="importSourceGroup">
<radio id="phoenix" label="&importFromPhoenix.label;" accesskey="&importFromPhoenix.accesskey;" hidden="true"/>
#ifdef XP_UNIX
#ifdef XP_MACOSX
<!-- XXXben - uncomment these as we write migrators for them
@ -75,7 +76,6 @@
<radio id="dogbert" label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
<radio id="opera" label="&importFromOpera.label;" accesskey="&importFromOpera.accesskey;"/>
#else
<radio id="phoenix" label="&importFromPhoenix.label;" accesskey="&importFromPhoenix.accesskey;"/>
<radio id="seamonkey" label="&importFromSeamonkey.label;" accesskey="&importFromSeamonkey.accesskey;"/>
<radio id="dogbert" label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
<radio id="opera" label="&importFromOpera.label;" accesskey="&importFromOpera.accesskey;"/>
@ -100,6 +100,7 @@
<radio id="dogbert" label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
#endif
#endif
<radio id="nothing" label="&importFromNothing.label;" accesskey="&importFromNothing.accesskey;" hidden="true"/>
</radiogroup>
</wizardpage>

Просмотреть файл

@ -6,8 +6,10 @@
<!ENTITY importFromIE.label "Microsoft Internet Explorer">
<!ENTITY importFromIE.accesskey "M">
<!ENTITY importFromPhoenix.label "Phoenix 0.1-0.5, Firebird 0.6-0.7 or Firefox 0.8">
<!ENTITY importFromPhoenix.label "Phoenix, Firebird or Firefox 0.8">
<!ENTITY importFromPhoenix.accesskey "P">
<!ENTITY importFromNothing.label "Don't import anything">
<!ENTITY importFromNothing.accesskey "D">
<!ENTITY importFromSeamonkey.label "Netscape 6, 7 or Mozilla 1.x">
<!ENTITY importFromSeamonkey.accesskey "N">
<!ENTITY importFromNetscape4.label "Netscape 4.x">

Просмотреть файл

@ -64,6 +64,7 @@
#define FILE_NAME_MIMETYPES NS_LITERAL_STRING("mimeTypes.rdf")
#define FILE_NAME_DOWNLOADS NS_LITERAL_STRING("downloads.rdf")
#define FILE_NAME_PREFS NS_LITERAL_STRING("prefs.js")
#define FILE_NAME_USER_PREFS NS_LITERAL_STRING("user.js")
#define FILE_NAME_SEARCH NS_LITERAL_STRING("search.rdf")
#define FILE_NAME_USERCHROME NS_LITERAL_STRING("userChrome.css")
#define FILE_NAME_USERCONTENT NS_LITERAL_STRING("userContent.css")
@ -134,6 +135,9 @@ nsPhoenixProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
MigrationData data[] = { { ToNewUnicode(FILE_NAME_PREFS),
nsIBrowserProfileMigrator::SETTINGS,
PR_TRUE },
{ ToNewUnicode(FILE_NAME_USER_PREFS),
nsIBrowserProfileMigrator::SETTINGS,
PR_TRUE },
{ ToNewUnicode(FILE_NAME_COOKIES),
nsIBrowserProfileMigrator::COOKIES,
PR_TRUE },
@ -291,6 +295,7 @@ nsPhoenixProfileMigrator::CopyPreferences(PRBool aReplace)
// Prefs files
rv |= CopyFile(FILE_NAME_PREFS, FILE_NAME_PREFS);
rv |= CopyFile(FILE_NAME_USER_PREFS, FILE_NAME_USER_PREFS);
// Security Stuff
rv |= CopyFile(FILE_NAME_CERT8DB, FILE_NAME_CERT8DB);

Просмотреть файл

@ -65,6 +65,7 @@
#define FILE_NAME_MIMETYPES NS_LITERAL_STRING("mimeTypes.rdf")
#define FILE_NAME_DOWNLOADS NS_LITERAL_STRING("downloads.rdf")
#define FILE_NAME_PREFS NS_LITERAL_STRING("prefs.js")
#define FILE_NAME_USER_PREFS NS_LITERAL_STRING("user.js")
#define FILE_NAME_SEARCH NS_LITERAL_STRING("search.rdf")
#define FILE_NAME_USERCONTENT NS_LITERAL_STRING("userContent.css")
#define DIR_NAME_CHROME NS_LITERAL_STRING("chrome")
@ -128,6 +129,9 @@ nsSeamonkeyProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
MigrationData data[] = { { ToNewUnicode(FILE_NAME_PREFS),
nsIBrowserProfileMigrator::SETTINGS,
PR_TRUE },
{ ToNewUnicode(FILE_NAME_USER_PREFS),
nsIBrowserProfileMigrator::SETTINGS,
PR_TRUE },
{ ToNewUnicode(FILE_NAME_COOKIES),
nsIBrowserProfileMigrator::COOKIES,
PR_FALSE },
@ -539,6 +543,7 @@ nsSeamonkeyProfileMigrator::CopyPreferences(PRBool aReplace)
return rv;
rv |= TransformPreferences(FILE_NAME_PREFS, FILE_NAME_PREFS);
rv |= CopyFile(FILE_NAME_USER_PREFS, FILE_NAME_USER_PREFS);
// Security Stuff
rv |= CopyFile(FILE_NAME_CERT8DB, FILE_NAME_CERT8DB);