Bug 304290 - Allow 'paste as text' as the default option when dragging into Konsole
Summary: Allow 'paste as text' as the default option when dragging into Konsole
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.9
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-30 15:52 UTC by Enda
Modified: 2015-08-29 12:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enda 2012-07-30 15:52:51 UTC
Dragging a file from Dolphin into Konsole to move or copy a
file into the current directory that one was typing commands in would
not be done very often. A Terminal input is for text, not handling
files. Files can be copied via the File Manager, which can be easily
opened by right-clicking Konsole and selecting 'Open File Manager' and
then dragging the file into that window, or even since it is a
terminal, typing 'mv ' and dragging the file into Konsole to insert
its full location and then ' .' and RETURN, which would move the file
into the current directory. I often drag a file into Konsole if I need
a file's full location. While there is a 'Paste as Text' option, this
is a lot slower than simply dragging. I think that dragging a file
from Dolphin into Konsole to move or copy a file into the current
directory should be an option, not set by default.

Reproducible: Always
Comment 1 Travis Evans 2014-03-23 22:24:09 UTC
I'm inclined to agree. Dragging URLs (e.g., from a web page) is the worst culprit. The most sensible action would be to paste the URL. But instead, I get a popup menu full of meaningless options. The only one besides “paste location” that makes remote sense is “copy” (but how often would someone actually want to do that?). “Move” makes no sense (how would Konsole delete a URL from a web page in another browser?), and what on earth does “link” mean in this context?

All this seems to mean is that pasting a URL, which should be a simple one-step operation, becomes two, which is unnecessary complexity for little to no real benefit. There apparently isn't even a modifier key shortcut for just copying as text, even though that's probably by far the most commonly used operation! To add insult to injury, the option is buried near the end of the menu instead of being at the very top.
Comment 2 Travis Evans 2014-03-23 22:30:47 UTC
I should perhaps clarify that I'm really talking specifically about HTTP/HTTPS URLs in my last comment. For protocols such as FTP, SFTP, SSH, etc., these menu items might make sense, but it would still be good to either have a modifier shortcut for paste as text, or to allow an option to make this the default.
Comment 3 disposable-hero 2014-10-05 14:28:00 UTC
I see that the drag-and-drop menu is useful for many users (see Bug 160583). But for others it is just an annoyance (see also Bug 66479) - especially in its current form.
Worst of all, the most straightforward action, "Paste Location", is not even at the top of the menu (and has no modifier key). As a result, dragging-and-dropping a file path requires way more attention than appropriate. Users unfamiliar with Konsole's behaviour (the terminals of GNOME and Xfce simply insert the path) might even accidentally move their files.

So, please consider doing the following:
- Move "Paste Location" to the top of the menu. ("Change Directory To" should probably be second.)
- Add an option to disable the drag-and-drop menu.
- Perhaps assign a modifier key to paste the path if the menu is enabled or to show the menu if it is disabled.

The first two changes would not affect those who like the menu, but make it less annoying and usable for everyone. The last one would break the behaviour known from Dolphin etc. and might be controversial.
Comment 4 Peter Wu 2015-08-24 21:13:36 UTC
Patch available at https://git.reviewboard.kde.org/r/124908/
Comment 5 Peter Wu 2015-08-27 15:27:02 UTC
Note: if you are trying to drag URLs from Chromium (as attempted by my brother), the patch will still not work in Qt 5.5.0 as expected due to a Qt bug: https://bugreports.qt.io/browse/QTBUG-47981
Comment 6 Kurt Hindenburg 2015-08-29 12:42:54 UTC
Git commit 9484507f9070ce655fb6e332358fca9afbb200dc by Kurt Hindenburg.
Committed on 29/08/2015 at 12:40.
Pushed by hindenburg into branch 'master'.

Add option to insert DnD URLs as plain text

This patch allows the dnd menu to be disabled, making it possible to
drag and drop URLs as text by default.

Thanks to Peter Wu peter lekensteyn nl for patch

REVIEW: 124908

M  +8    -0    src/EditProfileDialog.cpp
M  +1    -0    src/EditProfileDialog.h
M  +10   -0    src/EditProfileDialog.ui
M  +2    -0    src/Profile.cpp
M  +2    -0    src/Profile.h
M  +1    -1    src/TerminalDisplay.cpp
M  +8    -0    src/TerminalDisplay.h
M  +1    -0    src/ViewManager.cpp

http://commits.kde.org/konsole/9484507f9070ce655fb6e332358fca9afbb200dc