[Dolphin] Implement "Add to archive" option when dragging and dropping onto an archive file in dolphin
Review Request #119892 - Created Aug. 21, 2014 and updated
This patch implements the "Add to archive" option, which is shown when a user drags and drops files onto an existing archive.
Thanks for the patch, but I still think (see bug report) that implementing write support for archive kio slaves and then enable dnd for archives in Dolphin is the better way to achieve this. It will be also better in terms of consistency, because the user can not only drag files and folders onto archives but also paste files and folders into archives - archives will be like "normal" folders. ;)
I'm really interested what Frank thinks about it.
Thanks for your work on this feature - I think that many users would really appreciate this.
I think that Emmanuel's idea to add write support to the kioslave might be worth considering. However, implementing the drop on an archive file which is not opened in the view (i.e., the archive kioslave is not active yet) might be more difficult then maybe?
I would suggest to add David Faure as a reviewer to this request - maybe he has an idea what the best solution is.
A question concerning your proposed changes in Dolphin's source code: right now, when the user drops items on, e.g., a text file, this will be treated like a drop on the empty space in the view, i.e., the items will be copied/moved/linked to the directory which is shown in the view. With your patch, we would ask KonqOperations to drop the items on the text file, right? Will this result in an error message? I think that we should try to keep the current behavior in that situation, i.e., move/copy/link the dropped items in the directory that contains the text file where the items are dropped.
Yes, dropping a file onto an executable sounds like a good feature to have. Why disable it? It seems unrelated to the feature in this patch; just select the correct code path depending on whether you're dropping onto an executable or an archive....
Basically, refactor the code in the next hunk, which finds out if ark supports that mimetype, into a separate function that returns true if supported by ark, false if not. Doing the KService lookup twice is not a problem.