- 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
This commit is contained in:
parent
8638b9c496
commit
0a197f308e
2 changed files with 16 additions and 11 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue