www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 2a3b5593b746c184516ed44e010df889adf21d3e
parent 1746450abf022fdb41093c8837c8bfb2afeb0ec8
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 20 Nov 2009 20:25:09 +0000

- Add dialog when changing data directory to empty folder explaining that files need to be copied manually
- Change "Storage Location" to "Data Directory Location" in preferences


Diffstat:
Mchrome/content/zotero/preferences/preferences.xul | 3++-
Mchrome/content/zotero/xpcom/zotero.js | 19+++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul @@ -754,7 +754,8 @@ To add a new preference: </preferences> <groupbox> - <caption label="&zotero.preferences.dataDir;"/> + <!-- TODO: localize with &zotero.preferences.dataDir; --> + <caption label="Data Directory Location"/> <radiogroup id="dataDir" preference="pref-useDataDir" onsyncfrompreference="onDataDirLoad();" onsynctopreference="return onDataDirUpdate(event);"> <radio label="&zotero.preferences.dataDir.useProfile;" value="false"/> diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -556,6 +556,7 @@ var Zotero = new function(){ if (file.directoryEntries.hasMoreElements()) { var dbfile = file.clone(); dbfile.append('zotero.sqlite'); + // Warn if non-empty and no zotero.sqlite if (!dbfile.exists()) { var buttonFlags = ps.STD_YES_NO_BUTTONS; @@ -570,6 +571,24 @@ var Zotero = new function(){ } } } + else { + var buttonFlags = ps.STD_YES_NO_BUTTONS; + var index = ps.confirmEx(win, + //Zotero.getString('dataDir.selectedDirEmpty.title'), + //Zotero.getString('dataDir.selectedDirEmpty.text'), + 'Directory Empty', + 'The directory you selected is empty. To move an existing Zotero data directory, ' + + 'you will need to manually copy files from the existing data directory to the new location. ' + + 'See http://zotero.org/support/zotero_data for more information.\n\nUse the new directory?', + + buttonFlags, null, null, null, null, {}); + + // Not OK -- return to file picker + if (index == 1) { + continue; + } + } + // Set new data directory Zotero.Prefs.set('dataDir', file.persistentDescriptor);