commit 0a197f308e66ab3a111520a35cbd35040b6d3e67
parent 8638b9c4966f2697f9f4fb65891768da7df8814e
Author: Simon Kornblith <simon@simonster.com>
Date: Sun, 3 Jul 2011 04:33:37 +0000
- Open https://www.zotero.org/start_standalone (which doesn't yet exist) in default browser on Standalone first start. This will provide a place to download connectors and create an account.
- Don't copy quickstart setting during prefs migration
- Register zotero-reloaded nsIObserver properly
Diffstat:
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -395,7 +395,8 @@ if(appInfo.platformVersion[0] >= 2) {
Components.utils.evalInSandbox(prefsJs, sandbox);
var prefs = new XPCSafeJSObjectWrapper(sandbox.prefs);
for(var key in prefs) {
- if(key.substr(0, ZOTERO_CONFIG.PREF_BRANCH.length) == ZOTERO_CONFIG.PREF_BRANCH) {
+ if(key.substr(0, ZOTERO_CONFIG.PREF_BRANCH.length) === ZOTERO_CONFIG.PREF_BRANCH
+ && key !== "extensions.zotero.firstRun2") {
Zotero.Prefs.set(key.substr(ZOTERO_CONFIG.PREF_BRANCH.length), prefs[key]);
}
}
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -137,7 +137,7 @@ var ZoteroPane = new function()
// register an observer for Zotero reload
observerService = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
- observerService.addObserver(_reload, "zotero-reloaded", false);
+ observerService.addObserver(_reloadObserver, "zotero-reloaded", false);
this.addReloadListener(_loadPane);
// continue loading pane
@@ -227,11 +227,10 @@ var ZoteroPane = new function()
else if (Zotero.Prefs.get('firstRun2')) {
if (Zotero.Schema.dbInitialized || !Zotero.Sync.Server.enabled) {
setTimeout(function () {
- const url = "https://www.zotero.org/start";
if(Zotero.isStandalone) {
- ZoteroStandalone.openInViewer(url);
+ ZoteroPane_Local.loadURI("https://www.zotero.org/start_standalone");
} else {
- gBrowser.selectedTab = gBrowser.addTab(url);
+ gBrowser.selectedTab = gBrowser.addTab("https://www.zotero.org/start");
}
}, 400);
}
@@ -347,7 +346,7 @@ var ZoteroPane = new function()
if (this.itemsView)
this.itemsView.unregister();
- observerService.removeObserver(_reload, "zotero-reloaded", false);
+ observerService.removeObserver(_reloadObserver, "zotero-reloaded", false);
}
/**
@@ -3714,12 +3713,17 @@ var ZoteroPane = new function()
}
/**
- * Called when Zotero is reloaded (i.e., if it is switched into or out of connector mode)
+ * Implements nsIObserver for Zotero reload
*/
- function _reload() {
- Zotero.debug("Reloading Zotero pane");
- for each(var func in _reloadFunctions) func();
- }
+ var _reloadObserver = {
+ /**
+ * Called when Zotero is reloaded (i.e., if it is switched into or out of connector mode)
+ */
+ "observe":function() {
+ Zotero.debug("Reloading Zotero pane");
+ for each(var func in _reloadFunctions) func();
+ }
+ };
}
/**