Summary: | "empty trash" sometimes stays inactive | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Maciej J . Woloszyk <matofesi> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | update "empty trash" menu to reflect trash status |
Description
Maciej J . Woloszyk
2005-07-04 08:27:28 UTC
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. BUGS: 108523 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. + updateFolderMenu(); + if ( !showNotification ) return; @@ -1013,6 +1017,10 @@ BroadcastStatus::instance()->setStatusMsg(i18n("Moved all messages to the trash")); updateMessageActions(); + + // Disable empty trash/move all to trash action - we've just deleted/moved all folder + // contents. + mEmptyFolderAction->setEnabled( false ); } |