Review Request 114560: Disable the "Create Folder..." action (triggered by F10) in read-only directories
Frank Reininghaus
frank78ac at googlemail.com
Sun Dec 22 12:49:04 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114560/
-----------------------------------------------------------
(Updated Dec. 22, 2013, 12:49 p.m.)
Review request for Dolphin.
Changes
-------
(a) Simplified the patch by using the action collection to retrieve the "create_dir" action.
(b) Disabled the action by default. I noticed that this is necessary to ensure that F10 is disabled when opening Dolphin in a read-only folder (e.g., with "dolphin /"). The DolphinView only emits its signal when the "writable" state changes, and the action collection misses the very first change from "true" to "false" in DolphinView::slotDirectoryLoadingStarted() because the first signal is emitted before the action collection is connected to the signal).
With the first version of the patch, F10 would only be disabled if first a writable folder was visited, and then a non-writable one.
Bugs: 294054
http://bugs.kde.org/show_bug.cgi?id=294054
Repository: kde-baseapps
Description
-------
Pressing F10 in a read-only directory and then clicking "OK" in the "Create new folder" dialog will trigger an error message because it is not possible to create a new folder.
To fix this, one can keep a pointer to the action in DolphinViewActionHandler, connect that class to the view's writeStateChanged(bool) signal, and update the action when this signal is received.
Diffs (updated)
-----
dolphin/src/views/dolphinviewactionhandler.h edbe41b
dolphin/src/views/dolphinviewactionhandler.cpp 9a9718c
Diff: https://git.reviewboard.kde.org/r/114560/diff/
Testing
-------
Fixes the problem for me.
Thanks,
Frank Reininghaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20131222/d913e325/attachment.htm>
More information about the kfm-devel
mailing list