Tracker: Preload Trash icon manually, fixes #8696.
Change-Id: I171e6ee9305d4840e408a3b1c001fa5028d0bd95 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10653 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
nephele nephele
parent
84dc21e19e
commit
749584f78e
@@ -965,6 +965,9 @@ IconCache::Preload(AutoLock<SimpleIconCache>* nodeCacheLocker,
|
|||||||
entry = GetPrinterIcon(nodeCacheLocker, sharedCacheLocker,
|
entry = GetPrinterIcon(nodeCacheLocker, sharedCacheLocker,
|
||||||
&resultingOpenCache, model, source, mode, size, &lazyBitmap);
|
&resultingOpenCache, model, source, mode, size, &lazyBitmap);
|
||||||
ASSERT(entry != NULL);
|
ASSERT(entry != NULL);
|
||||||
|
} else if (model->IsTrash()) {
|
||||||
|
// do not preload Trash icon, TrashWatcher handles it.
|
||||||
|
source = kNode;
|
||||||
} else {
|
} else {
|
||||||
if (source == kUnknownSource) {
|
if (source == kUnknownSource) {
|
||||||
// look for node icons first
|
// look for node icons first
|
||||||
|
|||||||
@@ -68,6 +68,16 @@ BTrashWatcher::BTrashWatcher()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
thread_id
|
||||||
|
BTrashWatcher::Run()
|
||||||
|
{
|
||||||
|
fTrashFull = CheckTrashDirs();
|
||||||
|
UpdateTrashIcon();
|
||||||
|
|
||||||
|
return BLooper::Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BTrashWatcher::~BTrashWatcher()
|
BTrashWatcher::~BTrashWatcher()
|
||||||
{
|
{
|
||||||
stop_watching(this);
|
stop_watching(this);
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public:
|
|||||||
BTrashWatcher();
|
BTrashWatcher();
|
||||||
virtual ~BTrashWatcher();
|
virtual ~BTrashWatcher();
|
||||||
|
|
||||||
|
virtual thread_id Run();
|
||||||
bool CheckTrashDirs();
|
bool CheckTrashDirs();
|
||||||
bool IsTrashNode(const node_ref*) const;
|
bool IsTrashNode(const node_ref*) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user