Version: 2.0.89 (using Devel) OS: Linux If you configure a folder to be special (sent mail, trash, templates, drafts), the special icon should appear next to the folder name. However, this doesn't happen for most cases. Reproducible: Sometimes Steps to Reproduce: 1. Settings > Configure KMail 2. Identity, select an account, Modify 3. In the Advanced tab, click on one of the folder selection icons and select a folder or 1. Settings > Configure KMail 2. Accounts, select an account, click Modify 3. In the Advanced tab, click the folder selection icon and select a folder for trash Actual Results: The folder icon does not change in the folder view. Expected Results: The folder should get a special icon indicating its purpose. OS: Linux (i686) release 2.6.35.2-server-1mnb Compiler: gcc One of my three trash folders has the proper icon. None of the other special folders has special icons.
I confirm this bug. I tried to fix it in imap resource but don't understand why it doesn't work Index: setupserver.cpp =================================================================== --- setupserver.cpp (révision 1204707) +++ setupserver.cpp (copie de travail) @@ -48,6 +48,7 @@ #include <akonadi/kmime/specialmailcollections.h> #include <akonadi/kmime/specialmailcollectionsrequestjob.h> #include <akonadi/resourcesettings.h> +#include <akonadi/entitydisplayattribute.h> #include <kemailsettings.h> #include <klocale.h> #include <kpushbutton.h> @@ -277,7 +278,14 @@ Settings::self()->setSieveVacationFilename( m_vacationFileName ); Settings::self()->setTrashCollection( m_ui->folderRequester->collection().id() ); + Akonadi::EntityDisplayAttribute *attribute = m_ui->folderRequester->collection().attribute<Akonadi::EntityDisplayAttribute>( Akonadi::Entity::AddIfMissing ); + attribute->setIconName( QLatin1String( "user-trash" ) ); + Akonadi::CollectionModifyJob *job = new Akonadi::CollectionModifyJob( m_ui->folderRequester->collection() ); + job->start();
The patch looks like the right approach, but you are modifying a temporary copy of the collection (Akonadi::Collection is implicitly shared), so the ItemModifyJob will not actually change anything. Try something like: Akonadi::Collection trash = m_ui->folderRequester->collection(); Akonadi::EntityDisplayAttribute *attribute = trash.attribute<Akonadi::EntityDisplayAttribute>( Akonadi::Entity::AddIfMissing ); attribute->setIconName( QLatin1String( "user-trash" ) ); new Akonadi::CollectionModifyJob( trash ); (Akonadi::Job sub-classes are auto-started, so no need to explicitly call start() btw).
Ok works fine now that we don't use temporary copy thanks
SVN commit 1205151 by mlaurent: Fix Special folder icons do not show bug #259082 Fix for trash icons. Will look at for other special folder type CCBUG: 259082 M +7 -0 setupserver.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1205151
*** Bug 259594 has been marked as a duplicate of this bug. ***