<table><tr><td style="">marten created this revision.<br />marten added a reviewer: KDE PIM.<br />Restricted Application added a project: KDE PIM.<br />marten requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11255">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>

<p>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.</p>

<p>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.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>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.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R206 KMail</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11255">https://phabricator.kde.org/D11255</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kmkernel.cpp</div></div></div><br /><div><strong>To: </strong>marten, KDE PIM<br /><strong>Cc: </strong>dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>