[Konsole-devel] Review Request: Allow Konsole to intelligently handle dropped files

Frank Roscher frank-roscher at gmx.net
Fri Aug 12 19:20:21 UTC 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/4600/
-----------------------------------------------------------

(Updated Aug. 12, 2011, 7:20 p.m.)


Review request for Konsole.


Changes
-------

Added a simple check to ensure the popup gets shown only for local paths - otherwise the code falls back to the old behavior of pasting the URLs as text.
This also affects other cases where we don't know the exact current path, for example screen sessions and root logins.

I'm aware this introduces an inconsistency; avoiding this would apparently require a custom popup, eliminating at least part of the advantage of using KonqOperations. The inconsistency might be acceptable seeing that Konsole has pretty advanced users, but ultimately I'm not the one to make that call. I won't be disappointed if you don't think it should be integrated like this, but I probably won't have the time to write up a patch with custom popups.

Oh, and sorry for the diff against the SVN repository. I tested against current git master, but ReviewBoard kind of didn't cooperate.


Summary
-------

With this patch Konsole creates a popup menu when a file from e.g. Dolphin has been dragged'n'dropped to it.
The popup menu allows to Copy, Move or Link the file into the current working directory or to simply paste its URL as text (the latter being the current behaviour in KDE4).

The popup is created using the same method that is used by dolphin, so there shouldn't be any concern about code duplication.
I'm not quite sure if this is the most elegant solution, especially with regard to my use of the sender() method. Please enlighten me if there's a better way :)

There was a (different) implementation for this back in KDE3 times; there's also a pretty popular wishlist item on the KDE forums.


Diffs (updated)
-----

  trunk/KDE/kdebase/apps/konsole/src/CMakeLists.txt 1192362 
  trunk/KDE/kdebase/apps/konsole/src/SessionController.cpp 1192362 
  trunk/KDE/kdebase/apps/konsole/src/TerminalDisplay.h 1192362 
  trunk/KDE/kdebase/apps/konsole/src/TerminalDisplay.cpp 1192362 

Diff: http://svn.reviewboard.kde.org/r/4600/diff


Testing
-------

All possible operations in the popup with files and folders; local as well as over SFTP, single files as well as multiple files at once.
Dropping simple text still works, as well.
But I do tend to miss obvious stuff sometimes.


Screenshots
-----------

Popup menu
  http://svn.reviewboard.kde.org/r/4600/s/456/


Thanks,

Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20110812/a40738a6/attachment.html>


More information about the konsole-devel mailing list