commit 14aaf2aa8b713cba0c189b22d3546df29f003256
parent 2e76f0128dab15edc03aeddd5852b7b14397ab83
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 12 Mar 2010 22:05:18 +0000
Data directory changing required two restarts in Firefox 3.6 on Windows
Diffstat:
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js
@@ -91,6 +91,11 @@ function onDataDirUpdate(event) {
if (event.originalTarget && event.originalTarget.tagName == 'button') {
return true;
}
+ // Fx3.6
+ else if (event.explicitOriginalTarget && event.explicitOriginalTarget.tagName == 'button') {
+ return true;
+ }
+
// If directory not set or invalid, prompt for location
if (!getDataDirPath()) {
event.stopPropagation();
@@ -117,8 +122,8 @@ function onDataDirUpdate(event) {
Zotero.Prefs.set('useDataDir', useDataDir);
var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]
.getService(Components.interfaces.nsIAppStartup);
- appStartup.quit(Components.interfaces.nsIAppStartup.eRestart);
- appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit);
+ appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit
+ | Components.interfaces.nsIAppStartup.eRestart);
}
radiogroup.selectedIndex = useDataDir ? 1 : 0;
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -622,8 +622,8 @@ var Zotero = new function(){
if (index == 0) {
var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]
.getService(Components.interfaces.nsIAppStartup);
- appStartup.quit(Components.interfaces.nsIAppStartup.eRestart);
- appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit);
+ appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit
+ | Components.interfaces.nsIAppStartup.eRestart);
}
return useProfileDir ? true : file;