Bug 256856 - Changing icon theme does not take effect in Dophin
Summary: Changing icon theme does not take effect in Dophin
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 325892 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-13 23:33 UTC by jack
Modified: 2022-11-22 05:13 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jack 2010-11-13 23:33:56 UTC
Version:           4.4 (using KDE 4.4.4) 
OS:                MS Windows

Changing icon theme does not guarantee changed icons in Dolphin - for example, icons will sometimes change theme depending on zoom level. Other times the theme will not show up at all. 

Reproducible: Always

Steps to Reproduce:
Change icon theme in K Control Panel, then proceed to view icons in Dolphin.

Actual Results:  
Some icons remain unchanged.


Changing icon size sometimes changes icon theme.
Comment 1 Franz Trischberger 2012-12-31 10:29:58 UTC
Still happening in kde-4.10-rc1, at least for folder icons. Reboot does not help, I have to manually clear /var/tmp/kdecache-$USER.
Comment 2 Franz Trischberger 2012-12-31 10:31:38 UTC
Oops, just saw the original report was targeted on windows - I use gentoo linux, Qt-4.8.4, so this seems to be a general problem. -> please reassign.
Comment 3 Franz Trischberger 2013-01-03 11:29:33 UTC
A way to workaround this issue:
* start dolphin
* change icontheme
* activate the dolphin window and reload the view (e.g. F5)
-> icons change to the new theme and stay!
Comment 4 Adrian Berriel 2013-03-08 22:51:00 UTC
I have the same problem, and I had it for a long time, since 4.1 or 4.2 I don't remember. Now I am on 4.10 on Arch Linux with qt 4.8.4 and the problem persists.

The problem however is not only on dolphin. Sometimes happens on context menus (the window menu and the desktop menu for example). In that case you see one icon theme (I think is always oxygen) on some items, and when you hover it changes to the icon theme you choose.

Franz's workaround seems to work. However is just a workaround.

I would like to help, I can download the code, however I don't know where to start.
Comment 5 Jekyll Wu 2013-06-27 15:41:23 UTC
reassign to the dolphin product, since the problem doesn't seem to be windows specific per recent comments.
Comment 6 Frank Reininghaus 2013-06-27 18:28:33 UTC
Thanks for the report, but I'm not sure if I understand what this report is about.

Is the problem that Dolphin does not react to icon theme changes at runtime? This is what comment 3 seems to suggest, but comment 1 sounds like that the problem is that wrong items stay after rebooting?

If there are wrong items after rebooting, then I'm pretty sure that this is not a Dolphin bug. Dolphin does not keep a private cache of icons after closing.

Note that there is another (slightly different) report about icon theme changes: bug 311636.
Comment 7 Franz Trischberger 2013-06-27 22:17:14 UTC
I would need to get access to a system running kde. But AFAIR dolphin did not react (entirely) on icon theme changes. If you missed F5 in #c3 icon theme would persist, even after reboot (deleting the cache is the only help). AFAIK the last time I checked only folder icons did not change, file icons actually did change - but as said I would need to check this again, may take some days.
Frank, are you not able to reproduce this issue?
Comment 8 Frank Reininghaus 2013-06-28 07:34:29 UTC
I tried it in KDE 4.10.3 (Opensuse) and my 4.10 branch and master builds. In my source builds, it seems to work fine (new Dolphin instances always use the new icon theme, old instances get their icons replaced as soon as these are hovered, or the view is reloaded).

In 4.10.3, I do see some strange effects (like changing the zoom level will switch between old and new icon themes). At first sight, one might think that this could be related to

https://git.reviewboard.kde.org/r/107039/

But then the QPixmapCache is per-process and not kept when closing the app, so this should not affect new Dolphin instances.

I can't really do any further analysis because I cannot reproduce the problem in a source build. However, if the QPixmapCache is not the problem (and I can't see how it could cause such a problem), then the problem is probably in KIcon/KIconLoad/KIconEngine.
Comment 9 Frank Reininghaus 2013-06-28 07:37:21 UTC
I meant KIconLoader, not KIconLoad. BTW, the fact that clearing the icon cache in /var/tmp helps could be another hint that the problem is in kdelibs. But I'm not really familiar with the KIcon* classes.
Comment 10 Frank Reininghaus 2013-07-26 08:05:13 UTC
I'll reassign to kdelibs/kdeui because I still think that the problem is most likely somewhere in KDE's KIcon* classes and that we cannot do anything about this in Dolphin.
Comment 11 Frank Reininghaus 2013-10-11 13:23:45 UTC
*** Bug 325892 has been marked as a duplicate of this bug. ***
Comment 12 John O'Shaughnessy 2013-10-14 05:41:27 UTC
Now using 4.11.2 and the problem appears to be fixed
Comment 13 Michael Pyne 2013-10-14 13:39:06 UTC
Pity I didn't see this one earlier (I wrote the KSharedDataCache that the current KIconLoader uses).

As long as you are using the SystemSettings / KControl Module to change the icon theme then the icon cache held in /var/kdecache-$USER should be cleared (though in fairness, that was only fixed since May 2010).

However applications which are still running possibly need to listen for the KGlobalSettings::emitChange message regarding a new icon theme (though this might be handled by KIconLoader directly now). Otherwise the application would have to be restarted to guarantee picking up the new theme.

Glad to hear it seems fixed, please reopen if that's not the case.
Comment 14 Denis Prost 2014-02-16 20:51:50 UTC
Unfortunately, the problem still happened for me on Mageia 4 with KDE 4.11.4.
Even after logout / login, I still saw Oxygen icons in dolphin, while other KDE applications (for example amarok) used the new Mak-Lion Taste icon theme I chose.
Same behaviour as it was said :  if I zoomed in or out, the proper theme was displayed, but as soon as I come back to 48x48 icons, oxygen theme was back again.
It was fixed by clearing /var/tmp/kdecache-denis.
Comment 15 John O'Shaughnessy 2014-02-17 02:44:33 UTC
(In reply to comment #14)
> Unfortunately, the problem still happened for me on Mageia 4 with KDE 4.11.4.
> Even after logout / login, I still saw Oxygen icons in dolphin, while other
> KDE applications (for example amarok) used the new Mak-Lion Taste icon theme
> I chose.
> Same behaviour as it was said :  if I zoomed in or out, the proper theme was
> displayed, but as soon as I come back to 48x48 icons, oxygen theme was back
> again.
> It was fixed by clearing /var/tmp/kdecache-denis.

Thanks Denis, I am experiencing the problem now on KDE 4.12.2 just tried your solution (in my own KDE cache) and this works for me too
Comment 16 Cristiano Guadagnino 2014-04-07 09:46:36 UTC
Still a problem here on Linux Manjaro 0.8.9 with KDE 4.12.3.
I believe the problem is not only in Dolphin, as I had problems also in Kate toolbar. The only workaround is to manually clear the icon cache in /var/tmp/kdecache-$USER.
Comment 17 Ista Zahn 2014-06-24 14:03:23 UTC
I have this problem on Archlinux with kde 4.13.2. Please, after four years can we fix this?
Comment 18 John O'Shaughnessy 2014-08-04 05:25:28 UTC
now on openSUSE with KDE 4.13.3 and problem persists
Comment 19 piedro 2015-06-10 22:52:59 UTC
ARCH Linux with plasma 5.2 the problem still exists, ??
Comment 20 Tom Kijas 2016-06-11 23:35:34 UTC
Yep, them bug is still here. After I installed Unity next to KDE5, it messed up icons in KDE (and other graphical-related things).
Comment 21 Michael Pyne 2016-06-19 01:24:35 UTC
Based on the comments that the bug is still present, and fixed by removing the icon cache, I've tried to reproduce but still cannot. I've also tried adding some debugging code to the base KSharedDataCache class, which is what uses the 'icon-theme.kcache' file.

What I have seen is that sometimes changing the icon theme (from "kcmshell5 icons" or through System Settings) results in a new icon-theme.kcache which duplicates a previous theme's inode number. E.g. if I run "ls -i ~/.cache/icon-cache.kcache" (where ~/.cache is the modern location for the icon caches), I get 4589980 as the inode, then 4587597 (after changing the icon theme from System Settings), then back to 4589980. But the kernel is allowed to reuse inode numbers, and in fact reusing existing entries is even quicker than creating new inodes, which implies that we can expect this happen, as long as the kernel is satisfied there won't be mixed references into the file by accident.

The debugging code I added assigns a unique ID when creating a new cache, and this unique ID *is* different each time I change the icon theme, even when the inode number is duplicated. So if you're still seeing this bug, after using System Settings to change the icon theme, then I'd have to look into something else (e.g. maybe it works on some file systems but not on others).
Comment 22 Pulfer 2016-07-10 17:15:35 UTC
Michael, should kbuildsycoca5 update ~/.cache/icon-cache.kcache? It actually doesn't, but I don't know if it's a bug. Something is Plasma 5 creates broken icon-cache.kcache file after icons theme change from System Settings. Usually I need to switch to new theme twice to make it fully applied. Otherwise I get mixed icons (some from current theme, some from previous).
Comment 23 Pulfer 2016-07-11 15:42:33 UTC
(In reply to Pulfer from comment #22)
> Michael, should kbuildsycoca5 update ~/.cache/icon-cache.kcache? It actually
> doesn't, but I don't know if it's a bug. Something is Plasma 5 creates
> broken icon-cache.kcache file after icons theme change from System Settings.
> Usually I need to switch to new theme twice to make it fully applied.
> Otherwise I get mixed icons (some from current theme, some from previous).

Well, it seems to be another bug: https://bugs.kde.org/show_bug.cgi?id=365363
Comment 24 Justin Zobel 2022-10-21 23:59:40 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 25 John O'Shaughnessy 2022-10-23 14:52:02 UTC
Sorry, Justin, but I have stopped using KDE / Plasma . I now only have GNOME or macOS Monterey.

> On 22 Oct 2022, at 00:59, Justin Zobel <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=256856
> 
> Justin Zobel <justin.zobel@gmail.com> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>         Resolution|---                         |WAITINGFORINFO
>             Status|REPORTED                    |NEEDSINFO
> 
> --- Comment #24 from Justin Zobel <justin.zobel@gmail.com> ---
> Thank you for reporting this bug in KDE software. As it has been a while since
> this issue was reported, can we please ask you to see if you can reproduce the
> issue with a recent software version?
> 
> If you can reproduce the issue, please change the status to "CONFIRMED" when
> replying. Thank you!
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 26 Bug Janitor Service 2022-11-07 05:09:14 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 27 Bug Janitor Service 2022-11-22 05:13:02 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!