Discussion:
D16413: Add a keyboard shortcut to create file
Thomas Surrel
2018-10-24 20:00:39 UTC
Permalink
thsurrel created this revision.
thsurrel added reviewers: Dolphin, Plasma, VDG.
Herald added a project: Dolphin.
Herald added a subscriber: kfm-devel.
thsurrel requested review of this revision.

REVISION SUMMARY
Like the existing F10 shortcut to create directories, this patch
adds a new shortcut to create files. The proposed default is Shift-F10.

Depends on D16412 <https://phabricator.kde.org/D16412>

FEATURE: 387762

TEST PLAN
Open Dolphin and hit Shift-F10.

REPOSITORY
R318 Dolphin

BRANCH
arc_newfileshortcut (branched from master)

REVISION DETAIL
https://phabricator.kde.org/D16413

AFFECTED FILES
CMakeLists.txt
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinpart.cpp
src/dolphinpart.h
src/views/dolphinviewactionhandler.cpp
src/views/dolphinviewactionhandler.h

To: thsurrel, #dolphin, #plasma, #vdg
Cc: kfm-devel, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Thomas Surrel
2018-10-24 20:01:27 UTC
Permalink
thsurrel edited the test plan for this revision.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16413

To: thsurrel, #dolphin, #plasma, #vdg
Cc: kfm-devel, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Elvis Angelaccio
2018-10-24 20:58:29 UTC
Permalink
elvisangelaccio added inline comments.

INLINE COMMENTS
CMakeLists.txt:11
set(QT_MIN_VERSION "5.8.0")
-set(KF5_MIN_VERSION "5.43.0")
+set(KF5_MIN_VERSION "5.52.0")
FYI: there is no time for KF5 5.52 (released on November 10th) in Applications 18.12 (dependency freeze is on November 8th).

If you want to ship this feature with 18.12, we'll have to go with `#ifdef`s
dolphinviewactionhandler.h:103
+ */
+ void createFile();
+
Please call it `createFileTriggered()` (I just pushed a patch that renames the `createDirectory()` signal).

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16413

To: thsurrel, #dolphin, #plasma, #vdg
Cc: elvisangelaccio, kfm-devel, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Thomas Surrel
2018-10-25 07:30:14 UTC
Permalink
thsurrel updated this revision to Diff 44200.
thsurrel added a comment.


Renamed signal

REPOSITORY
R318 Dolphin

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D16413?vs=44179&id=44200

BRANCH
arc_newfileshortcut (branched from master)

REVISION DETAIL
https://phabricator.kde.org/D16413

AFFECTED FILES
CMakeLists.txt
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinpart.cpp
src/dolphinpart.h
src/views/dolphinviewactionhandler.cpp
src/views/dolphinviewactionhandler.h

To: thsurrel, #dolphin, #plasma, #vdg
Cc: elvisangelaccio, kfm-devel, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Thomas Surrel
2018-10-25 07:33:13 UTC
Permalink
thsurrel marked an inline comment as done.
thsurrel added inline comments.

INLINE COMMENTS
elvisangelaccio wrote in CMakeLists.txt:11
FYI: there is no time for KF5 5.52 (released on November 10th) in Applications 18.12 (dependency freeze is on November 8th).
If you want to ship this feature with 18.12, we'll have to go with `#ifdef`s
Than I think this can wait for 19.04. I will land this after 18.12 is released.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D16413

To: thsurrel, #dolphin, #plasma, #vdg
Cc: elvisangelaccio, kfm-devel, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Elvis Angelaccio
2018-11-25 10:27:51 UTC
Permalink
elvisangelaccio accepted this revision.
elvisangelaccio added a comment.
This revision is now accepted and ready to land.


I don't have an opinion about the new shortcut, I'll leave that to the VDG team.

INLINE COMMENTS
CMakeLists.txt:11
set(QT_MIN_VERSION "5.8.0")
-set(KF5_MIN_VERSION "5.43.0")
+set(KF5_MIN_VERSION "5.52.0")
Please rebase, we are already depending on 5.53 now.

REPOSITORY
R318 Dolphin

BRANCH
arc_newfileshortcut (branched from master)

REVISION DETAIL
https://phabricator.kde.org/D16413

To: thsurrel, #dolphin, #plasma, #vdg, elvisangelaccio
Cc: elvisangelaccio, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Thomas Surrel
2018-11-25 14:31:34 UTC
Permalink
thsurrel updated this revision to Diff 46199.
thsurrel added a comment.


Rebase

REPOSITORY
R318 Dolphin

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D16413?vs=44200&id=46199

BRANCH
arc_newfileshortcut (branched from master)

REVISION DETAIL
https://phabricator.kde.org/D16413

AFFECTED FILES
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinpart.cpp
src/dolphinpart.h
src/views/dolphinviewactionhandler.cpp
src/views/dolphinviewactionhandler.h

To: thsurrel, #dolphin, #plasma, #vdg, elvisangelaccio
Cc: elvisangelaccio, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Andres Betts
2018-11-25 15:43:48 UTC
Permalink
abetts added a comment.


I think this could make sense if you are also able to change the kind of file that you want to create.

REPOSITORY
R318 Dolphin

BRANCH
arc_newfileshortcut (branched from master)

REVISION DETAIL
https://phabricator.kde.org/D16413

To: thsurrel, #dolphin, #plasma, #vdg, elvisangelaccio
Cc: abetts, elvisangelaccio, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Thomas Surrel
2018-11-25 21:52:38 UTC
Permalink
thsurrel added a comment.


This patch (together with D16412 <https://phabricator.kde.org/D16412>) links the shortcut to the first entry in the Create New list, and that list can be modified by adding entries: https://j605.tk/blog/post/shorts/new-templates-in-dolphin/
It is a feature not easy to discover but it exists :) There are some bugs open to improve the situation: https://bugs.kde.org/show_bug.cgi?id=400263.

REPOSITORY
R318 Dolphin

BRANCH
arc_newfileshortcut (branched from master)

REVISION DETAIL
https://phabricator.kde.org/D16413

To: thsurrel, #dolphin, #plasma, #vdg, elvisangelaccio
Cc: abetts, elvisangelaccio, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Nathaniel Graham
2018-11-26 00:14:16 UTC
Permalink
ngraham added a comment.


I'm not super enthused about `shift+F10` being the shortcut, but +1 on the feature!

What would be even better would be if the entire list were populated with keyboard shortcuts automatically, e.g. `ctrl+shift+1`, `ctrl+shift+2`, `ctrl+shift+3`, etc.

REPOSITORY
R318 Dolphin

BRANCH
arc_newfileshortcut (branched from master)

REVISION DETAIL
https://phabricator.kde.org/D16413

To: thsurrel, #dolphin, #plasma, #vdg, elvisangelaccio
Cc: ngraham, abetts, elvisangelaccio, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
Loading...