Bug 425191 - Allow folder creation on desktop via F10 shortcut
Summary: Allow folder creation on desktop via F10 shortcut
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: master
Platform: Neon Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2020-08-10 14:54 UTC by Patrick Silva
Modified: 2020-09-09 14:51 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-08-10 14:54:07 UTC
SUMMARY
We can use F10 shortcut to create a folder with Dolphin, but this shortcut
can not be used to create a folder on desktop.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Comment 1 Domenico Panella 2020-08-25 09:44:13 UTC
I am developing it but i need a help. 
At the moment i can see in systemsettings -> standard shortcut > Create Folder F10.
Now i should change the icon, translate the message (Create Folder) and i suppose associate a linux command ( mkdir ...)
Who can help me?
Comment 2 David Edmundson 2020-08-25 12:00:04 UTC
You don't want to be invoking linux commands...
Read the existing code for how the context menus work.

Both the context menus and shortcuts are both managed by "actions". 
Read through how refresh works (which has a shortcut) and how other file actions are made, for example deleting a dir.
Comment 3 Domenico Panella 2020-08-25 13:47:45 UTC
I have modified the following files:
kconfig/kstandardshortcut.h
kconfig/kstandardshortcut.cpp
kconfigwidgets/kstandardaction.h
kconfigwidgets/kstandardaction.cpp
kconfigwidgets/kstandardaction_p.h
I followed "deletefile" as example.
I runned ~/kde/build/plasma-workspace/login-sessions/install-sessions.sh
I Log in plasma-development.
I see a standard shortcut (Create Folder F10) in systemsettings but it isn't translated. 
I go in desktop screen and if i press F10 it does nothing.
Obviously, missing some steps.

Help?
Comment 4 Domenico Panella 2020-08-25 13:49:03 UTC
This is the second time that i try to resolve bug. Be patient please! ;)
Comment 5 Nate Graham 2020-08-25 13:50:18 UTC
There's no way of knowing without seeing your code. You could post it as a WIP patch on https://invent.kde.org, or ask for help in the kde-devel channel. See https://community.kde.org/Get_Involved/development#Communicate_with_the_team
Comment 8 Domenico Panella 2020-09-05 13:40:18 UTC
Can I mark as solved this bug?
Comment 9 Nate Graham 2020-09-05 13:48:30 UTC
No because it's not solved yet. :) https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/136 hasn't been merged.
Comment 10 Domenico Panella 2020-09-05 13:53:21 UTC
If this is merged, should I do it or do you?
Comment 11 Nate Graham 2020-09-05 13:56:52 UTC
It happens automatically as long as the final commit message has `BUG: 425191` in it somewhere. :)
Comment 12 Domenico Panella 2020-09-05 14:36:56 UTC
ok. :)
Comment 13 David Edmundson 2020-09-09 14:51:56 UTC
Git commit 59dfa775049fd76c4f438df3b22e9d9bbd83d436 by David Edmundson, on behalf of Domenico Panella.
Committed on 09/09/2020 at 14:51.
Pushed by davidedmundson into branch 'master'.

[folderview] Allow folder creation on desktop via F10 shortcut

M  +1    -1    containments/desktop/package/contents/ui/FolderViewLayer.qml
M  +13   -2    containments/desktop/plugins/folder/foldermodel.cpp
M  +1    -0    containments/desktop/plugins/folder/foldermodel.h

https://invent.kde.org/plasma/plasma-desktop/commit/59dfa775049fd76c4f438df3b22e9d9bbd83d436