Bug 423765 - Improve KFileItemAction action menu placement
Summary: Improve KFileItemAction action menu placement
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: git master
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-01 19:42 UTC by tcanabrava
Modified: 2020-12-09 14:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tcanabrava 2020-07-01 19:42:17 UTC
SUMMARY
KFileItemActions only adds actions to the end of the menu
It should be possible to specify the index, or the *before, just like QMenu does.
Right now I'm adding to the menu, removing, and re-adding to the menu in the correct place for konsole
Comment 1 Bug Janitor Service 2020-12-02 20:50:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/240
Comment 2 Ahmad Samir 2020-12-09 14:30:36 UTC
Git commit 1534dd1391f947f37c0cadc30b875b62425063c8 by Ahmad Samir.
Committed on 09/12/2020 at 14:19.
Pushed by ahmadsamir into branch 'master'.

KFileItemActions: add new method to insert openwith actions

This adds a new method, insertOpenWithActionsTo(), that will insert the
openWith actions before a specific action; if that action is nullptr or
isn't available in the topMenu, the openWith actions will be appended.

M  +35   -41   src/widgets/kfileitemactions.cpp
M  +24   -2    src/widgets/kfileitemactions.h

https://invent.kde.org/frameworks/kio/commit/1534dd1391f947f37c0cadc30b875b62425063c8