Reuse DolphinContextMenu in FoldersPanel
Needs ReviewPublic

Authored by meven on Apr 25 2020, 8:31 AM.

Details

Reviewers
ngraham
elvisangelaccio
Group Reviewers
Dolphin
Summary

Allow Panel to reuse Dolphin main Context menu.

Move a lot of actions handling from DolphinMainWindow and DolphinView to DolphinViewActionHandler.
In the process expose more slots and accessors.
Pass the KItemListSelectionManager and KFileItemListView of the foldersPanel around to have the selection accessible in DolphinMainWindow and DolphinViewActionHandler.

BUG: 270360
BUG: 406028
BUG: 420587
BUG: 295575
FIXED-IN: 20.08

Test Plan


Using the context menu in the folder panel :

Cuto/copy/paste to and from the folders panel
Duplicate
Rename
Add to places
Move to trash
Delete
Properties

Same using shortcuts (caution giving the foldersPanel the keyboard focus is tricky)

Diff Detail

Repository
R318 Dolphin
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25915
Build 25933: arc lint + arc unit
meven created this revision.Apr 25 2020, 8:31 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptApr 25 2020, 8:31 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
meven requested review of this revision.Apr 25 2020, 8:31 AM
meven edited the test plan for this revision. (Show Details)Apr 25 2020, 8:33 AM
meven planned changes to this revision.Apr 25 2020, 8:55 AM

The copy/cut/paste and the other actions are not correctly hooked.

(So much for unifying KFilePlacesView and Dolphin's view :)

(So much for unifying KFilePlacesView and Dolphin's view :)

Hmm, does this patch close the door on that? This seems sensible enough to me at first glance.

Haven't checked but pretty sure we have a context menu signal and/or could add one to KFilePlacesView similar to how we made the terminal teardown stuff work.

meven edited the summary of this revision. (Show Details)Apr 26 2020, 10:21 AM
meven edited the test plan for this revision. (Show Details)
meven edited the summary of this revision. (Show Details)Apr 26 2020, 10:26 AM
meven edited the test plan for this revision. (Show Details)
meven updated this revision to Diff 81220.Apr 26 2020, 10:28 AM

Make DolphinViewActionHandler the main executors for most actions, allow it to have set the selectionManager and itemlistViem to operate on

meven updated this revision to Diff 81224.Apr 26 2020, 11:22 AM

Small clean and doc

meven edited the summary of this revision. (Show Details)Apr 26 2020, 12:19 PM
meven added a comment.May 23 2020, 2:06 PM

ping reviewers

Sorry for the delay in reviewing. This is a large and somewhat intimidating patch :) I will check it out soon.

meven added a comment.May 25 2020, 4:33 AM

Sorry for the delay in reviewing. This is a large and somewhat intimidating patch :) I will check it out soon.

I can move it to gitlab if it eases review.
I hope my commit message helps a little.

This has some merge conflicts if I try to rebase it on current master Can you rebase it?

meven added a comment.May 26 2020, 2:55 PM

It will need quite some work to rebase indded, since this introduce the concept of having context menu actions in DolphinViewActionHandler and this is now a few weeks old...
I might rename DolphinViewActionHandler to simply DolphinActionHandler since this will be more relevant.
I believe the code will overall be in better shape that previous with more code delegated to DolphinViewActionHandler rather that bloating forever DolphinView and DolphinMainWindow.
Might move to gitlab directly as this is just in the infancy of the review.