Bug 375333 - Folders thumbnails : custom folder icon overridden by default folder icon
Summary: Folders thumbnails : custom folder icon overridden by default folder icon
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: 5.8.5
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Development Mailing List
URL:
Keywords:
: 321856 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-20 09:49 UTC by Mahendra Tallur
Modified: 2017-03-10 14:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 17.04
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mahendra Tallur 2017-01-20 09:49:26 UTC
[I'm closing my former bugreport and reopening another one as it was not assigned properly]

When using a custom icon, previews and especially folders previews being enabled, if the directory contains pictures, the directory icon is replaced by the default folder icon.

Reproducible: Always

Steps to Reproduce:
1. Create a directory and put a couple of pictures inside of it.
2. In Dolphin settings, make sure thumbnails are enabled for directories
3. Switch the view mode to icons and enable previews
4. Change the icon of the directory with a custom one (any icon from the default set will do : for instance folder-videos)

Actual Results:  
The icon of the created directory will display previews of pictures it contains, over the default folder icon.

Expected Results:  
The icon of the created directory should consist of the pictures previews above the custom icon selected beforehand.

Using KDE Neon LTS ; KDE Framework 5.30.
Comment 1 Mahendra Tallur 2017-01-20 09:49:51 UTC
I'm pasting Rog's comment on my preview bugreport which I'm about to close :


By my knowledge the kio-extras. Folder thumbnailing is using the icon theme directory icon. ie:

https://cgit.kde.org/kio-extras.git/  ->  /kio-extras/thumbnail/thumbnail.cpp
has, from line 466:

//Use the current (custom) folder icon
const QMimeDatabase db;
const QString iconName = db.mimeTypeForName("inode/directory").iconName();

const QPixmap folder = QIcon::fromTheme(iconName).pixmap(qMin(m_width, m_height));
Comment 2 Mahendra Tallur 2017-01-20 09:50:57 UTC
*** Bug 370247 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2017-01-20 12:35:26 UTC
*** Bug 321856 has been marked as a duplicate of this bug. ***
Comment 4 Elvis Angelaccio 2017-01-20 15:13:16 UTC
I can reproduce this issue. The thumbnail protocol should read the custom icon name, which is stored by kio in the .directory file of the folder being 'thumbnailed'.
Comment 5 Kai Uwe Broulik 2017-01-20 15:38:54 UTC
https://phabricator.kde.org/D4222
Comment 6 Kai Uwe Broulik 2017-01-24 11:12:02 UTC
Git commit 2524fc27f31af744b0d8bfbb7662ab5f2bd13ec0 by Kai Uwe Broulik.
Committed on 24/01/2017 at 11:11.
Pushed by broulik into branch 'master'.

[Folder thumbnailer] Use custom folder icon if set

CHANGELOG: Folder thumbnails now respect custom folder icons

Differential Revision: https://phabricator.kde.org/D4222

M  +4    -6    thumbnail/thumbnail.cpp

https://commits.kde.org/kio-extras/2524fc27f31af744b0d8bfbb7662ab5f2bd13ec0
Comment 7 Mahendra Tallur 2017-01-24 11:14:45 UTC
What a quick fix ! Thank you, you made my day :-)
Comment 8 Kai Uwe Broulik 2017-01-24 11:21:21 UTC
Thanks for your investigation, was the right spot in the code you found :)
Comment 9 Mahendra Tallur 2017-01-24 11:33:28 UTC
I just bothered the right persons ;) Rog came up with the location of the issue.
Comment 10 Mahendra Tallur 2017-02-16 13:43:22 UTC
Hi ! I just upgraded KDE Frameworks to version 5.31.0 (KDE Neon LTS) and it seems this bugfix is not included in this version. Is it supposed to ?

Cheers !
Comment 11 Mahendra Tallur 2017-02-16 13:47:04 UTC
Hmm, it seems kio is part ofr KDE Frameworks but kio-extras seems to be part of KDE Applications. Version 16.12.2 of KDE apps doesn't seem to include this fix. I'll be patient, sorry for bothering ;)
Comment 12 Mahendra Tallur 2017-03-10 08:24:24 UTC
Hi ! Really sorry for bothering again, but it seems the fix didn't make it to KDE apps 16.12.3.
Comment 13 Mahendra Tallur 2017-03-10 08:26:52 UTC
(In reply to Mahendra Tallur from comment #12)
> Hi ! Really sorry for bothering again, but it seems the fix didn't make it
> to KDE apps 16.12.3.

I mean, I just upgraded to KDE apps 16.12.3 (in KDE Neon LTS), logged out, logged back in, browsed directories in Dolphin in "thumbnails mode". Custom icons are shown for a couple of seconds then replaced by the default ones when the directory previews are shown.
Comment 14 Elvis Angelaccio 2017-03-10 09:56:57 UTC
@Mahendra: you may want to delete your thumbnail cache folders: ~/.cache/thumbnails/large and ~/.cache/thumbnails/normal
Comment 15 Rog131 2017-03-10 14:02:10 UTC
With the Arch Linux.

Comparing source of kio-extras 16.12.3-1 and kio-extras master.

The https://cgit.kde.org/kio-extras.git/commit/?id=2524fc27f31af744b0d8bfbb7662ab5f2bd13ec0 is not in the kio-extras 16.12.3.
Comment 16 Elvis Angelaccio 2017-03-10 14:28:06 UTC
Ah right, it seems the fix was committed on master only.