diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 4a854bc90..21f7e879a 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -175,6 +175,16 @@ var ZoteroPane = new function() menu.addEventListener("popupshowing", ZoteroPane.contextPopupShowing, false); Zotero.Keys.windowInit(document); + + // 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 they sync their DB to another profile or if + // they the DB is initialized erroneously (e.g. while switching data + // directory locations) + if (Zotero.Schema.dbInitialized && Zotero.Prefs.get('firstRun')) { + gBrowser.selectedTab = gBrowser.addTab('http://www.zotero.org/documentation/quick_start_guide'); + Zotero.Prefs.set('extensions.zotero.firstRun', false); + } } diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 5981b01d4..29bfb8281 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -27,6 +27,7 @@ Zotero.Schema = new function(){ this.updateScrapersRemote = updateScrapersRemote; this.stopRepositoryTimer = stopRepositoryTimer; + this.dbInitialized = false; this.upgradeFinished = false; this.goToChangeLog = false; @@ -37,6 +38,8 @@ Zotero.Schema = new function(){ var _fulltextItemWordsCache = []; + var self = this; + function userDataUpgradeRequired() { var dbVersion = _getDBVersion('userdata'); var schemaVersion = _getSchemaSQLVersion('userdata'); @@ -467,6 +470,8 @@ Zotero.Schema = new function(){ + "\n\n" + Zotero.getString('install.quickStartGuide.message.thanks'); Zotero.DB.query(sql, msg); Zotero.DB.commitTransaction(); + + self.dbInitialized = true; } catch(e){ Zotero.debug(e, 1); diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js index fe124ebe4..b84e58bd1 100644 --- a/defaults/preferences/zotero.js +++ b/defaults/preferences/zotero.js @@ -1,5 +1,7 @@ // These are DEFAULT prefs for the INSTALL. You will have to reinstall the extension to see differences! +pref("extensions.zotero.firstRun", true); + pref("extensions.zotero.useDataDir", false); pref("extensions.zotero.dataDir", ''); pref("extensions.zotero.lastDataDir", '');