D11284: Reader window opened on message in trash still shows "Move to trash" action

Jonathan Marten noreply at phabricator.kde.org
Tue Mar 13 13:38:48 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
  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.
  
  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().
  
  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.

TEST PLAN
  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".

REPOSITORY
  R206 KMail

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

AFFECTED FILES
  src/kmmainwidget.cpp
  src/kmreadermainwin.cpp
  src/util.cpp
  src/util.h

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/20180313/4198dd9f/attachment.html>


More information about the kde-pim mailing list