commit f7a0602b3b6c62d8ad10a1acd9417d618dba72d5
parent 1e60f8947a1a9b186843b1b1e26128d44c1affcd
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 14 Feb 2011 04:57:38 +0000
Show "Unfiled Items" in personal library by default
Diffstat:
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js
@@ -106,7 +106,9 @@ Zotero.CollectionTreeView.prototype.refresh = function()
var unfiledLibraries = Zotero.Prefs.get('unfiledLibraries').split(',');
}
catch (e) {
- unfiledLibraries = [];
+ // Add to personal library by default
+ Zotero.Prefs.set('unfiledLibraries', '0');
+ unfiledLibraries = ['0'];
}
var self = this;
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -1604,14 +1604,14 @@ Zotero.Prefs = new function(){
Zotero.debug("Creating boolean pref '" + pref + "'");
return this.prefBranch.setBoolPref(pref, value);
}
- if (parseInt(value) == value) {
- Zotero.debug("Creating integer pref '" + pref + "'");
- return this.prefBranch.setIntPref(pref, value);
- }
if (typeof value == 'string') {
Zotero.debug("Creating string pref '" + pref + "'");
return this.prefBranch.setCharPref(pref, value);
}
+ if (parseInt(value) == value) {
+ Zotero.debug("Creating integer pref '" + pref + "'");
+ return this.prefBranch.setIntPref(pref, value);
+ }
throw ("Invalid preference value '" + value + "' for pref '" + pref + "'");
}
}