Review Request 128759: Show shortcut for New Folder action

Elvis Angelaccio elvis.angelaccio at kdemail.net
Sat Aug 27 21:45:19 UTC 2016



> On Aug. 25, 2016, 10:53 p.m., Albert Astals Cid wrote:
> > src/filewidgets/knewfilemenu.cpp, line 804
> > <https://git.reviewboard.kde.org/r/128759/diff/1/?file=475283#file475283line804>
> >
> >     Previously createDirectory was called unconditionally and now it is not, isn't that a problem?
> 
> Elvis Angelaccio wrote:
>     Only if the action's triggered signal is not connected to the createDirectory slot. I updated the apidox with this info, but yeah we can't be 100% sure (unless there is a way to check whether a given signal is connected to a given slot - perhaps some moc black magic?)
> 
> Albert Astals Cid wrote:
>     It seems a bit convoluted to me, if you're not using a "create_dir" action, createDirectory() will be automatically called for you, but if you're using a "create_dir" you need to call createDirectory() manually? Why not call createDirectory() in both cases?

We could do that, but then we also need to patch Dolphin to remove its connection to createDirectory() (otherwise the dialog is shown twice). If we go this way, I think we could even consider deprecating createDirectory() since it would be no longer necessary...


- Elvis


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


On Aug. 26, 2016, 12:48 p.m., Elvis Angelaccio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128759/
> -----------------------------------------------------------
> 
> (Updated Aug. 26, 2016, 12:48 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> 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
> -----
> 
>   src/filewidgets/knewfilemenu.h dfc808b9072c118031d2ed675a6578e192f7abf6 
>   src/filewidgets/knewfilemenu.cpp a340429f5b7f99842747c6805187256e00179f22 
> 
> 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/20160827/f99c6fa6/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list