Bug 364477

Summary: Preview for text files doesn't show correct icon for launcher files
Product: [Applications] dolphin Reporter: Janet <bugzilla>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: cfeck, nate
Priority: NOR    
Version First Reported In: 16.12.2   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: wrong icon in preview (default icon), look at properties (correct icon)
screenshot of url.desktop with disabled previews

Description Janet 2016-06-18 23:56:51 UTC
If you enable the preview for text files, this also concernes launchers for applications and URLs. Alas a default icon is used in the preview which doesn't help in identifying the text file as launcher. If an icon is specified in the desktop-file that icon should be used as watermark in the preview instead of the default icon. E.g. a launcher for an URL should contain the text-html icon as watermark in the preview, the icon that is specified in the text file and would be used if the preview wasn't enabled. 

Reproducible: Always
Comment 1 Janet 2016-06-19 00:00:40 UTC
Created attachment 99587 [details]
wrong icon in preview (default icon), look at properties (correct icon)
Comment 2 Christoph Feck 2016-06-19 02:35:18 UTC
This is not the icon, but the thumbnail (preview). What is shown if you turn off previews?

See also bug 220330.
Comment 3 Janet 2016-06-23 09:04:32 UTC
Created attachment 99666 [details]
screenshot of url.desktop with disabled previews

When i turn off the preview the correct icon, the html one, is shown. Preview thumbnails other than desktop-files show the correct icon in the thumbnail.

Bug 220330 references the same issue, but for KDE SC 4. This should be handled as a duplicate?

I don't care if the desktop-files are shown as text previews or not when text preview is enabled, it just should be guaranteed that the icon of the desktop-file (application icon or in case of URL the default URL icon) is used with enabled preview for text files, either the icon without preview or the correct icon in the thumbnail preview.

An option (include/exclude desktop-files) for the text file preview would be nice (I know devs don't like that ;) ) but even in that case the icon (solo or inside thumbnail) should be correct.
Comment 4 Nate Graham 2017-08-18 16:44:00 UTC
Confirmed; turning on previews makes .desktop files render their contents, but does not badge them with the correct icon, if available.