D11255: New mail notification: Can show message, but not delete it

Jonathan Marten noreply at phabricator.kde.org
Mon Mar 12 08:51:44 GMT 2018


marten created this revision.
marten added a reviewer: KDE PIM.
Restricted Application added a project: KDE PIM.
marten requested review of this revision.

REVISION SUMMARY
  The "New mail arrived" notification (for a single message) has a "Show mail" button.  This is useful, but in the message viewer window that appears when this button is clicked the "Move to wastebin" action is disabled, both in the toolbar and "File" menu.  This is a pity, because if the message turns out to be junk it would be very useful to be able to delete it immediately without having to open the main KMail window.
  
  The problem appears to be in KMKernel::showMail(), where KMReaderMainWin::showMessage() is called with the third parameter, the item's parent collection, defaulted to none.  KMReaderMainWin::showMessage() then disables the delete action because canChange is false if there is no parent collection.
  
  This change fetches the item's parent collection as part of the job, and then passes it to the reader window.  The delete action is then enabled and works, allowing an unwanted message to be deleted with just one extra click.

TEST PLAN
  Built kmail with this change.  Verified that, in the reader window opened from the notification button, the "Move to wastebin" action is enabled and works.

REPOSITORY
  R206 KMail

REVISION DETAIL
  https://phabricator.kde.org/D11255

AFFECTED FILES
  src/kmkernel.cpp

To: marten, #kde_pim
Cc: dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180312/398bc84d/attachment.html>


More information about the kde-pim mailing list