Tracker now prefers an icon coming directly from the MIME type over one specified
by the application - as FileTypes already did. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19829 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
68fb266820
commit
8cddf19132
@ -386,8 +386,13 @@ IconCache::GetIconFromMetaMime(const char *fileType, IconDrawMode mode,
|
||||
__FILE__, __LINE__, fileType));
|
||||
|
||||
BMimeType mime(fileType);
|
||||
char preferredAppSig[B_MIME_TYPE_LENGTH];
|
||||
if (mime.GetPreferredApp(preferredAppSig) == B_OK) {
|
||||
// try getting the icon directly from the metamime
|
||||
if (mime.GetIcon(lazyBitmap->Get(), size) != B_OK) {
|
||||
// try getting it from the preferred app of this type
|
||||
char preferredAppSig[B_MIME_TYPE_LENGTH];
|
||||
if (mime.GetPreferredApp(preferredAppSig) != B_OK)
|
||||
return NULL;
|
||||
|
||||
SharedCacheEntry *aliasTo = 0;
|
||||
if (entry)
|
||||
aliasTo = (SharedCacheEntry *)entry->ResolveIfAlias(&fSharedCache);
|
||||
@ -408,11 +413,7 @@ IconCache::GetIconFromMetaMime(const char *fileType, IconDrawMode mode,
|
||||
return aliasTo;
|
||||
}
|
||||
}
|
||||
|
||||
// try getting the icon directly from the metamime
|
||||
if (mime.GetIcon(lazyBitmap->Get(), size) != B_OK)
|
||||
return NULL;
|
||||
|
||||
|
||||
BBitmap *bitmap = lazyBitmap->Adopt();
|
||||
if (!entry) {
|
||||
PRINT_ADD_ITEM(("File %s; Line %d # adding entry for type %s\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user