Bug 435410

Summary: Inconsistency between "Copy/Move Message" in main window and reader window
Product: [Applications] kmail2 Reporter: Jonathan Marten <jjm>
Component: commands and actionsAssignee: kdepim bugs <kdepim-bugs>
Severity: normal    
Priority: NOR    
Version: Git (master)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jonathan Marten 2021-04-06 07:55:53 UTC

These actions in the KMail main window (menu bar - Message - Copy/Move Message To) or in the message list RMB popup do not look or work the same as those in the separate message reader window popup menu.

Firstly, in the main window the "Move" action has an icon, in the reader window it has none.

Secondly, when one if these actions is used in the main window the "Recent Folder" list that shows there is updated with the last used folder, so next time it appears at the top of the list.  When used in the reader window, the recent folder list is available but is not updated with the folder that was used, either in the same reader window or the main window.

1. Select a message in the message list.
2. Do menu bar - Message - Copy Message To - any folder
3. Do menu bar - Message - Copy Message To - Recent Folder and note that the folder is now at the top of the list.
4. Open the message in a separate reader window.
5. Do popup - Copy message To - any other folder
6. Do popup - Copy Message To - Recent Folder and note that the list is still the same as in (3) and the folder destination in (5) is not at the top of the list.
7. Also observe that in the popup menu, "Move Message To" has no icon.


Folder list in reader window not updated as above, and "Move" action has no icon.


The folder list is updated, and "Move" has an icon.
Comment 1 Laurent Montel 2021-04-06 11:27:55 UTC
Git commit 45eae3fe64bccda3baee27829b09a9e330b33fa7 by Laurent Montel.
Committed on 06/04/2021 at 11:27.
Pushed by mlaurent into branch 'release/21.04'.

Add icon for "move to"

M  +1    -0    src/kmreadermainwin.cpp

Comment 2 Jonathan Marten 2021-04-08 16:51:42 UTC
First part of fix submitted as https://invent.kde.org/pim/akonadi/-/merge_requests/57
Comment 3 Bug Janitor Service 2021-04-09 09:12:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kmail/-/merge_requests/21
Comment 4 Jonathan Marten 2021-04-10 13:53:28 UTC
Git commit 79f84aa36743637c274af0134dffe46a5122826c by Jonathan Marten.
Committed on 10/04/2021 at 07:25.
Pushed by mlaurent into branch 'master'.

Make the recently accessed folder list globally accessible

This is normally managed by RecentCollectionAction, but is only updated
by StandardActionManager when its standard actions are used.  If a
caller uses its own actions, for example KMail's separate message reader
window, then the list is not updated.

Add a static function StandardActionManager::addRecentCollection(),
which simply calls RecentCollectionAction::addRecentCollection() to
update the global recent collection list.  Read and update this list in
RecentCollectionAction as before.

M  +35   -22   src/widgets/recentcollectionaction.cpp
M  +8    -4    src/widgets/recentcollectionaction_p.h
M  +6    -0    src/widgets/standardactionmanager.cpp
M  +8    -0    src/widgets/standardactionmanager.h

Comment 5 Laurent Montel 2021-04-16 04:46:29 UTC
Git commit a6737b4cfd48fb3ec16de1d7648b5d99dcfea39e by Laurent Montel, on behalf of Jonathan Marten.
Committed on 16/04/2021 at 04:46.
Pushed by mlaurent into branch 'master'.

Make the Copy/Move actions in the message reader window work consistently

That is, consistently with those in the main KMail window.  Use those
main window actions to set the text and icon, so that the icon fallback
implemented in Akonadi::StandardActionManager works.  Save the folder
used for a copy or move action in the recently used folder list so that
the list is updated even though we are not using the standard Akonadi

M  +1    -1    CMakeLists.txt
M  +17   -9    src/kmreadermainwin.cpp