make sure we write bin/profile defaults.ini files in the right place, not both
in the profile (clobbering profile extension data with global extension
data)...

also fix some js errors preventing theme reversion from happening in safe mode

... and get rid of "optional components" section in update wizard


git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@163167 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ben%bengoodger.com
2004-10-03 21:06:30 +00:00
parent 5488bd9a65
commit 3d8452d1be
4 changed files with 21 additions and 18 deletions

View File

@@ -1630,7 +1630,7 @@ nsExtensionManager.prototype = {
try {
lastSelectedSkin = gPref.getCharPref(PREF_EM_LAST_SELECTED_SKIN);
gPref.clearUserPref(PREF_EM_LAST_SELECTED_SKIN);
pref.setCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN, lastSelectedSkin);
gPref.setCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN, lastSelectedSkin);
}
catch (e) { }
@@ -1649,7 +1649,7 @@ nsExtensionManager.prototype = {
catch (e) { }
}
catch (e) {
dump("*** nsExtensionManager::start - failure, catching exception so finalize window can close\n");
dump("*** nsExtensionManager::start - failure, catching exception so finalize window can close = " + e + "\n");
}
win.close();
@@ -1670,7 +1670,8 @@ nsExtensionManager.prototype = {
if (!gPref.prefHasUserValue(PREF_EM_LAST_SELECTED_SKIN)) {
gPref.setCharPref(PREF_EM_LAST_SELECTED_SKIN,
gPref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN));
pref.clearUserPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
if (gPref.prefHasUserValue(PREF_GENERAL_SKINS_SELECTEDSKIN))
gPref.clearUserPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
}
var items = this._ds.getItemList(null, nsIUpdateItem.TYPE_EXTENSION, {});
@@ -1698,7 +1699,7 @@ nsExtensionManager.prototype = {
}
}
catch (e) {
dump("*** nsExtensionManager::start - (safe mode) failure, catching exception so finalize window can close\n");
dump("*** nsExtensionManager::start - (safe mode) failure, catching exception so finalize window can close = " + e + "\n");
}
win.close();
@@ -2189,8 +2190,9 @@ nsExtensionManager.prototype = {
_writeDefaults: function nsExtensionManager__writeDefaults (aIsProfile)
{
this._writeProfileFile(getFile(KEY_PROFILEDIR, [FILE_DEFAULTS]),
this._getPreferencesDir, aIsProfile);
var manifest = aIsProfile ? getFile(KEY_PROFILEDIR, [FILE_DEFAULTS]) :
getFile(KEY_APPDIR, [FILE_DEFAULTS]);
this._writeProfileFile(manifest, this._getPreferencesDir, aIsProfile);
},
_cleanDirs: function nsExtensionManager__cleanDirs ()

View File

@@ -197,7 +197,6 @@
<handler event="keypress" keycode="vk_left" modifiers="meta" action="this.selected = null"/>
<handler event="keypress" keycode="vk_right" modifiers="meta" action="this.selected = null"/>
<handler event="keypress" keycode="vk_delete" action="if (this.selected) this.selected.fireEvent('remove');"/>
<handler event="keypress" key=" " action="if (this.selected) { this.selected.pauseResume(); }"/>
</handlers>
</binding>

View File

@@ -628,11 +628,12 @@ var gFoundPage = {
var patches = this._currentInfo.getCollection("patches", { });
if (patches.length > 0 && !updatePerformed)
this.buildPatches(patches);
var components = this._currentInfo.getCollection("optional", { });
if (components.length > 0)
this.buildOptional(components);
// Turning this off until we can better determine what is and is not installed.
// var components = this._currentInfo.getCollection("optional", { });
// if (components.length > 0)
// this.buildOptional(components);
var languages = this._currentInfo.getCollection("languages", { });
if (languages.length > 0)
this.buildLanguages(languages);

View File

@@ -795,7 +795,8 @@ nsAppUpdater.prototype = {
newestVersionObj.resource = update;
}
}
this._parseVersionData(aDataSource, newestVersionObj.resource, this._service._newestVersion);
if (newestVersionObj.resource)
this._parseVersionData(aDataSource, newestVersionObj.resource, this._service._newestVersion);
// There is a newer version of the app available or there are any critical
// patches available update the severity and available updates preferences.
@@ -808,7 +809,7 @@ nsAppUpdater.prototype = {
var languages = this._service._newestVersion.languages;
if (languages) {
var cr = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
.getService(Components.interfaces.nsIXULChromeRegistry);
.getService(Components.interfaces.nsIXULChromeRegistry);
var selectedLocale = cr.getSelectedLocale("global");
for (var i = 0; i < languages.length; ++i) {
if (languages[i].internalName == selectedLocale)
@@ -816,8 +817,8 @@ nsAppUpdater.prototype = {
}
}
if (haveLanguage &&
(newestVersionObj.version != appVersion || (patches && patches.length > 0))) {
if ((haveLanguage && (newestVersionObj.version != appVersion)) ||
(patches && patches.length > 0)) {
gPref.setIntPref(PREF_UPDATE_SEVERITY, 2);
gPref.setBoolPref(PREF_UPDATE_APP_UPDATESAVAILABLE, true);
}
@@ -875,7 +876,7 @@ nsAppUpdater.prototype = {
try {
collectionResource = collectionResource.QueryInterface(Components.interfaces.nsIRDFResource);
}
catch (e) { return; }
catch (e) { return null; }
var cu = Components.classes["@mozilla.org/rdf/container-utils;1"]
.getService(Components.interfaces.nsIRDFContainerUtils);
@@ -883,7 +884,7 @@ nsAppUpdater.prototype = {
var c = Components.classes["@mozilla.org/rdf/container;1"]
.getService(Components.interfaces.nsIRDFContainer);
c.Init(aDataSource, collectionResource);
var elements = c.GetElements();
var fileArc = gRDF.GetResource(APP_NS("file"));
var platform = getOSKey();
@@ -915,7 +916,7 @@ nsAppUpdater.prototype = {
result.push(info);
}
}
return result;
},