Tracker: Always use thumb attr when there is one

... even when the "Generate image thumbnails" setting is off.

This allows applications to generate thumbnails for 'non-media' files.
For example I use this in the ACE Amstrad CPC Emulator, to add a
thumbnail to emulator savestates (snapshots) with a screen capture of
the machine.

Change-Id: I95b0e4c64f5b1ffa779512755f70cfd9c1881661
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5768
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
PulkoMandy
2022-12-12 10:26:58 +00:00
committed by Adrien Destugues
parent fa557843f2
commit 6e8c897e21
+4 -1
View File
@@ -620,8 +620,11 @@ Model::FinishSettingUpType()
else if (strcmp(type, kVirtualDirectoryMimeType) == 0)
fBaseType = kVirtualDirectoryNode;
if (ShouldGenerateThumbnail(type))
attr_info thumb;
if (fNode->GetAttrInfo(kAttrThumbnail, &thumb) == B_OK
|| ShouldGenerateThumbnail(type)) {
fIconFrom = kNode;
}
if (info.GetPreferredApp(type) == B_OK) {
if (fPreferredAppName)