Closes #1637, Load "Start" page on upgrade
Show start page when first run pref is on and either the DB was just initialized or there's no username and password in the Sync pane
This commit is contained in:
parent
ef4a1f9cb7
commit
0fc3252895
3 changed files with 20 additions and 8 deletions
|
@ -181,17 +181,19 @@ var ZoteroPane = new function()
|
|||
}
|
||||
}, 1000);
|
||||
}
|
||||
// If the database was initialized and Zotero hasn't been run before
|
||||
// in this profile, display the Quick Start Guide -- this way the guide
|
||||
// won't be displayed when they sync their DB to another profile or if
|
||||
// the DB is initialized erroneously (e.g. while switching data
|
||||
// directory locations)
|
||||
else if (Zotero.Schema.dbInitialized && Zotero.Prefs.get('firstRun')) {
|
||||
// If the database was initialized or there are no sync credentials and
|
||||
// Zotero hasn't been run before in this profile, display the start page
|
||||
// -- this way the page won't be displayed when they sync their DB to
|
||||
// another profile or if the DB is initialized erroneously (e.g. while
|
||||
// switching data directory locations)
|
||||
else if (Zotero.Prefs.get('firstRun2')
|
||||
&& (Zotero.Schema.dbInitialized || !Zotero.Sync.Server.enabled)) {
|
||||
setTimeout(function () {
|
||||
var url = "http://zotero.org/start";
|
||||
gBrowser.selectedTab = gBrowser.addTab(url);
|
||||
}, 400);
|
||||
Zotero.Prefs.set('firstRun', false);
|
||||
Zotero.Prefs.set('firstRun2', false);
|
||||
Zotero.Prefs.clear('firstRun');
|
||||
}
|
||||
|
||||
// Hide sync debugging menu by default
|
||||
|
|
|
@ -1309,6 +1309,16 @@ Zotero.Prefs = new function(){
|
|||
}
|
||||
|
||||
|
||||
this.clear = function (pref) {
|
||||
try {
|
||||
this.prefBranch.clearUserPref(pref);
|
||||
}
|
||||
catch (e) {
|
||||
throw ("Invalid preference '" + pref + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Methods to register a preferences observer
|
||||
//
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// Add new user-adjustable hidden preferences to
|
||||
// http://www.zotero.org/documentation/hidden_prefs
|
||||
|
||||
pref("extensions.zotero.firstRun", true);
|
||||
pref("extensions.zotero.firstRun2", true);
|
||||
pref("extensions.zotero@chnm.gmu.edu.description", "chrome://zotero/locale/zotero.properties");
|
||||
|
||||
pref("extensions.zotero.useDataDir", false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue