Review Request 128759: Show shortcut for New Folder action

Elvis Angelaccio elvis.angelaccio at kdemail.net
Mon Sep 5 15:33:10 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128759/
-----------------------------------------------------------

(Updated Sept. 5, 2016, 3:33 p.m.)


Review request for KDE Frameworks and David Faure.


Changes
-------

Much simpler version of the patch (thanks Albert!). We just "take" the shortcut from the action in the actionCollection(), and we make sure we don't run in conflicts when the shortcut is used.


Bugs: 366075
    https://bugs.kde.org/show_bug.cgi?id=366075


Repository: kio


Description
-------

Dolphin sets a F10 shortcut to create new folders, but this shortcut doesn't show up near the action. This happens because the action is created by KNewFileMenu which doesn't know about the shortcut. Since we pass an action collection to KNewFileMenu, this issue can be easily fixed by looking up a fixed action key (e.g. `create_dir`, already used by Dolphin) and assuming that the client code sets a shortcut for this action.

We just need to keep track whether we find such an action in the action collection (otherwise "New -> Folder..." in Dolphin opens the dialog twice).


Diffs (updated)
-----

  src/filewidgets/knewfilemenu.h dfc808b 
  src/filewidgets/knewfilemenu.cpp a340429 

Diff: https://git.reviewboard.kde.org/r/128759/diff/


Testing
-------

Make sure that "New -> Folder" shows F10 as shortcut in Dolphin.
Make sure that triggering the action doesn't show the dialog twice.


Thanks,

Elvis Angelaccio

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160905/7cf52c47/attachment.html>


More information about the Kde-frameworks-devel mailing list