Fix the Delete/Move To Trash actions for remote files
Review Request #111206 - Created June 24, 2013 and submitted
The attached patch fixes which one of the remove actions are shown in both Dolphin and Konqueror. Its main goal is not to show the "Move To Trash" for remote protocols, e.g. sftp, smb. As such the patch does the following: 1.) For local files, show both the "Move To Trash" and "Delete" actions if the "ShowDeleteCommand" global option is set. Pressing Shift key will have no effect. 2.) For local files, show only "Move To Trash" when the "ShowDeleteCommand" global option is not set. Pressing the Shift key will change the action to "Delete". 3.) For remote files, only show the "Delete" action. Never show the "Move To Trash" action.
Thanks for the patch Dawit! The approach looks good to me, from my point of view this can go in unless David has any objections. One little question though: is there a reason why you moved the "Trash/Delete"-related code to a different location in DolphinContextMenu::openItemContextMenu()? This makes the diff larger, and it becomes harder to understand what's going on if anyone investigates the file's history at some point in the future.
Review request changed
- Added a KFileItemListProperties parameter to DolphinContextMenu::insertDefaultItemActions and moved the deletion code back where it was. - Fixed a coding style issue.
Revision 2 (+53 -50)