As Marcus noticed, some icons were gone after my last change; in fact no icons
were shown for all files without an own icon, and without one from its MIME type. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19866 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e30afed439
commit
a803529b13
@ -393,14 +393,17 @@ IconCache::GetIconFromMetaMime(const char *fileType, IconDrawMode mode,
|
|||||||
if (mime.GetPreferredApp(preferredAppSig) != B_OK)
|
if (mime.GetPreferredApp(preferredAppSig) != B_OK)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
SharedCacheEntry *aliasTo = 0;
|
SharedCacheEntry *aliasTo = NULL;
|
||||||
if (entry)
|
if (entry)
|
||||||
aliasTo = (SharedCacheEntry *)entry->ResolveIfAlias(&fSharedCache);
|
aliasTo = (SharedCacheEntry *)entry->ResolveIfAlias(&fSharedCache);
|
||||||
|
|
||||||
// look for icon defined by preferred app from metamime
|
// look for icon defined by preferred app from metamime
|
||||||
aliasTo = (SharedCacheEntry *)GetIconForPreferredApp(fileType,
|
aliasTo = (SharedCacheEntry *)GetIconForPreferredApp(fileType,
|
||||||
preferredAppSig, mode, size, lazyBitmap, aliasTo);
|
preferredAppSig, mode, size, lazyBitmap, aliasTo);
|
||||||
|
|
||||||
if (aliasTo) {
|
if (aliasTo == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
// make an aliased entry so that the next time we get a
|
// make an aliased entry so that the next time we get a
|
||||||
// hit on the first FindItem in here
|
// hit on the first FindItem in here
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
@ -412,8 +415,8 @@ IconCache::GetIconFromMetaMime(const char *fileType, IconDrawMode mode,
|
|||||||
ASSERT(aliasTo->HaveIconBitmap(mode, size));
|
ASSERT(aliasTo->HaveIconBitmap(mode, size));
|
||||||
return aliasTo;
|
return aliasTo;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
// at this point, we've found an icon for the MIME type
|
||||||
BBitmap *bitmap = lazyBitmap->Adopt();
|
BBitmap *bitmap = lazyBitmap->Adopt();
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
PRINT_ADD_ITEM(("File %s; Line %d # adding entry for type %s\n",
|
PRINT_ADD_ITEM(("File %s; Line %d # adding entry for type %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user