Display trash can all the time, unless showTrashWhenEmpty is set to false

- Icon isn't currently reset to empty state when all trashed items are removed
- Dragging doesn't yet work

Addresses #513
This commit is contained in:
Dan Stillman 2009-01-31 06:19:14 +00:00
parent 61e1131fc1
commit e36b41f6c2
4 changed files with 6 additions and 1 deletions

View file

@ -165,9 +165,10 @@ Zotero.CollectionTreeView.prototype.refresh = function()
}
var deletedItems = Zotero.Items.getDeleted();
if (deletedItems) {
if (deletedItems || Zotero.Prefs.get("showTrashWhenEmpty")) {
this._showItem(new Zotero.ItemGroup('trash', null), 0, this._dataItems.length);
}
this.trashNotEmpty = !!deletedItems;
this._refreshHashMap();
@ -375,6 +376,9 @@ Zotero.CollectionTreeView.prototype.getCellText = function(row, column)
Zotero.CollectionTreeView.prototype.getImageSrc = function(row, col)
{
var collectionType = this._getItemAtRow(row).type;
if (collectionType == 'trash' && this.trashNotEmpty) {
collectionType += "-full";
}
return "chrome://zotero/skin/treesource-" + collectionType + ".png";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

View file

@ -33,6 +33,7 @@ pref("extensions.zotero.capitalizeTitles", true);
pref("extensions.zotero.launchNonNativeFiles", false);
pref("extensions.zotero.sortNotesChronologically", false);
pref("extensions.zotero.sortAttachmentsChronologically", false);
pref("extensions.zotero.showTrashWhenEmpty", true);
pref("extensions.zotero.lastCreatorFieldMode",0);
pref("extensions.zotero.lastAbstractExpand",0);