Version: (using KDE KDE 3.4.1)
Installed from: Gentoo Packages
I use message filtering with kmail and I have some filters that put messages received with POP3 directly into trash. When I receive mail and open trash I can see some messages and then use context menu to empty trash - everything is fine to this point. After emptying trash "empty trash" in context menu deactivates as there should be no messages in trash to remove. But then I receive messages from another account - this is some information eccount and all of its messages are filtered into trash. After that when I try to empty trash again (trash folder is the one that is opened for all the time) the "empty trash" in context menu is inactive - kmail didn't noticed that some messages have been put into trash using filters.
I've just found out exactly when the "empty trash" stays disabled with some mail in trash. The problem occurs when the trash is empty and you select the trash - "empty trash" is disabled. If then you receive some mail that is filterd directly to trash, trash contains some mail but "empty trash" is still disabled - it looks like filtering should notify rest of kmail that it put some mails into trash.
And BTW I currently use KDE 3.5 beta 1.
And to make sure the report doesn't got forgotten - the same behaviour is still present in KDE 3.5.2. To confirm it you just need to create a filter in kmail that moves some incoming mail into trash and mark it as read (I'm not sure if the last part is necessary), then select trash folder, make sure it's empty, select another folder then trash again ("empty trash" in context menu shoud be inactive) and then download some mail that would be filtered directly to trash - even though trash contains some mail the "empty trash" stays inactive auntil you select another folder and then trash again.
Created attachment 15543 [details]
update "empty trash" menu to reflect trash status
Ok. I did some ugly hacking and I think I can show the rough idea of what I
would like to be done "the proper way" (probably somewhere in asynchroneous
kmail mechanisms after messages really got deleted). For now the patch works
fine for me - it calls updateFolderMenu() after fetching mail making sure
everyting is updated even after filtering. To make things work properly it also
disables mEmptyFolderAction in slotEmptyFolder. Now I can have messages
filtered directly to trash that is selected and I the "Empty trash" menu
changes it's state depending on the trash status (and it also works for "Move
all to trash").
Just installed KDE 3.5.3 - bug is still there :(
Just installed KDE 3.5.4 - bug is still there :(
Just to let anyone (?) reading (??) this - 3.5.5 installed with bug still there.
SVN commit 596184 by winterz:
Fix Bug 108523: "empty trash" sometimes stays inactive.
Patch provided by Maciej J . Woloszyk. Thanks Maciej!
Patch approved by Ingo.
M +8 -0 kmmainwidget.cpp
--- branches/KDE/3.5/kdepim/kmail/kmmainwidget.cpp #596183:596184
@@ -846,6 +846,10 @@
+ // update folder menus in case some mail got filtered to trash/current folder
+ // and we can enable "empty trash/move all to trash" action etc.
if ( !showNotification )
@@ -1013,6 +1017,10 @@
BroadcastStatus::instance()->setStatusMsg(i18n("Moved all messages to the trash"));
+ // Disable empty trash/move all to trash action - we've just deleted/moved all folder
+ // contents.
+ mEmptyFolderAction->setEnabled( false );