Bug 484555 - [Dolphin] Enhance with “Create folder from selected files”
Summary: [Dolphin] Enhance with “Create folder from selected files”
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Ahmet Hakan Çelik
URL:
Keywords: junior-jobs
: 417400 434768 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-26 21:19 UTC by bugsie
Modified: 2025-01-31 15:57 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.08.0
Sentry Crash Report:


Attachments
screenshot (46.25 KB, image/png)
2024-03-26 21:19 UTC, bugsie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugsie 2024-03-26 21:19:48 UTC
Created attachment 167817 [details]
screenshot

From all the availabe services for Dolphin from the KDE Store, the one called “Create folder from selected files” (https://store.kde.org/p/1560212) seems to make the most sense as a “general” i.e. “everyone benefits from it”- enhancement. Who doesn’t work with files in a file manager?

I think it should be integrated in Dolphin in one form or another.
Comment 1 Méven Car 2024-03-27 09:50:55 UTC
A KFileItemActions https://api.kde.org/frameworks/kio/html/classKFileItemActions.html in dolphin similar to the `copy to` `move to` ones is the way to implementing, using KNewFileMenu::creatDirectory https://api.kde.org/frameworks/kio/html/classKNewFileMenu.html
Comment 2 Ahmet Hakan Çelik 2024-05-04 08:57:24 UTC
I developed this feature with directory create-copy-paste functions on dolphinmainwindow.cpp. But I don't know which is better, move or copy-paste actions?
Comment 3 Oded Arbel 2024-05-04 09:22:56 UTC
Personally, I would prefer "move" - but @bugsie, as the OP, should have a say.
Comment 4 Ahmet Hakan Çelik 2024-05-05 05:47:02 UTC
Also is there any shortcut advice for this action?
Comment 5 Bug Janitor Service 2024-05-05 07:07:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/770
Comment 6 Méven Car 2024-05-05 10:15:59 UTC
(In reply to Ahmet Hakan Çelik from comment #4)
> Also is there any shortcut advice for this action?

There won't be a way if it is implemented with a KFileItemAction.

There is a feature https://bugs.kde.org/show_bug.cgi?id=260266 for this.
This bug is on my radar, on my shortlist of priority bugs (in 3rd position).
Comment 7 bugsie 2024-05-05 17:21:35 UTC
(In reply to Ahmet Hakan Çelik from comment #2)
> I developed this feature with directory create-copy-paste functions on
> dolphinmainwindow.cpp. But I don't know which is better, move or copy-paste
> actions?

(In reply to Oded Arbel from comment #3)
> Personally, I would prefer "move" - but @bugsie, as the OP, should have a
> say.

tl;dr: Just "move".

The idea behind it is to do 1 simple (common) thing and do it well (fast & effectively), residing in the main (root) menu. For more complex "copy to" and "move to" other locations functionality there is  already a context menu available under "Configure Dolphin" -> "Context Menu" -> "Copy to" and "move to" commands.

I wrote about it in KDE's Brainstorm section a month ago, here's the link https://discuss.kde.org/t/dolphin-enhance-with-create-folder-from-selected-files/13038 for those who maybe want to participate there.
Comment 8 Felix Ernst 2024-05-23 13:25:06 UTC
Git commit d448f4f35d286cae45a62f5a9c1a3be81202f92b by Felix Ernst, on behalf of Ahmet Hakan Çelik.
Committed on 23/05/2024 at 13:25.
Pushed by felixernst into branch 'master'.

Add "Move to New Folder…" action

This commit introduces an action which creates a new folder with a name
specified by the user and moves all the currently selected items there
in one go.

This action is implemented as a KFileItemActionPlugin which means users
can disable it on Dolphin's context menu settings page.

M  +12   -0    src/CMakeLists.txt
A  +54   -0    src/itemactions/movetonewfolderitemaction.cpp     [License: GPL(v2.0+)]
A  +28   -0    src/itemactions/movetonewfolderitemaction.h     [License: GPL(v2.0+)]
A  +14   -0    src/itemactions/movetonewfolderitemaction.json

https://invent.kde.org/system/dolphin/-/commit/d448f4f35d286cae45a62f5a9c1a3be81202f92b
Comment 9 Méven Car 2025-01-21 17:21:26 UTC
*** Bug 417400 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2025-01-21 17:32:59 UTC
*** Bug 434768 has been marked as a duplicate of this bug. ***
Comment 11 Méven 2025-01-31 15:57:48 UTC
Git commit 02875a35ae044bebdc695f79446c1605d0ba43ed by Méven Car.
Committed on 31/01/2025 at 15:57.
Pushed by meven into branch 'master'.

Add a Move into new folder Drag'nDrop plugin

This should be very convenient for users, saving clicks when organizing files.

Implemented as a plugin, so we can later allow to disable it at runtime. This also simplify implementation.

![image.png](/uploads/25e7346ef539f4418c1e35c8f56ecba8/image.png){width="722" height="608"}

Only implemented for local files for now.

M  +11   -1    autotests/dropjobtest.cpp
M  +1    -0    src/filewidgets/CMakeLists.txt
A  +8    -0    src/filewidgets/dropIntoNewFolder/CMakeLists.txt
A  +90   -0    src/filewidgets/dropIntoNewFolder/dropintonewfolderPlugin.cpp     [License: GPL(v2.0+)]
A  +32   -0    src/filewidgets/dropIntoNewFolder/dropintonewfolderPlugin.h     [License: GPL(v2.0+)]
A  +9    -0    src/filewidgets/dropIntoNewFolder/dropintonewfolderPlugin.json
M  +8    -2    src/filewidgets/knewfilemenu.cpp
M  +7    -0    src/filewidgets/knewfilemenu.h

https://invent.kde.org/frameworks/kio/-/commit/02875a35ae044bebdc695f79446c1605d0ba43ed