<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/D11284">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If a separate reader window is opened on a message which is in a trash folder, the menu and toolbar still show the "Move to trash" action text and icon. However, clicking this action actually deletes the message permanently. The toolbar and menu actions change appropriately in the KMail main window, so the message viewer should do so as well to correctly reflect the action that will be done.</p>
<p>Because similar code and identical UI strings are needed for both cases, I've copied it out of KMMainWidget::updateFolderMenu() into a new function Util::setActionTrashOrDelete().</p>
<p>I'm not sure what the comment "Use same text as in Text property. Change it in kf5" is intended to mean. If it is saying that the tool tip text set is exactly the same as the action text, then that is true as far as the user sees - but it wouldn't be possible to just do 'action->setToolTip(action->text())' because the text() has '&' accelerators included. Unless we remove the accelerators from the action text, but that would be an I18N change and the automatically assigned accelerator may be different.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Built KMail with this change. Verified that the reader window shows and does "Move to trash" unless the message is in the trash already, in which case it shows and does "Delete".</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/D11284">https://phabricator.kde.org/D11284</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kmmainwidget.cpp<br />
src/kmreadermainwin.cpp<br />
src/util.cpp<br />
src/util.h</div></div></div><br /><div><strong>To: </strong>marten, KDE PIM<br /><strong>Cc: </strong>dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>