Bug 393523 - Dragging a file or folder to Konsole should always paste the path
Summary: Dragging a file or folder to Konsole should always paste the path
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: master
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-04-25 23:28 UTC by Nate Graham
Modified: 2018-05-03 13:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2018-04-25 23:28:32 UTC
When you drag a file or folder to a Konsole window, you get the standard KDE menu giving you the option to copy, link, paste the path to the item, or cancel.

The only action that makes any sense is "paste path"; copy and link conceptually make no sense for this use case and choosing either of them brings up a scary "that action would replace the file" dialog.

Therefore, Konsole should always interpret dragged files as the desire to paste the path and not even bother showing the pop-up menu of drag options.
Comment 1 Nate Graham 2018-04-26 01:38:54 UTC
OK, turns out move, copy, and link do work if you've dragged an item to a terminal window whose working directory is somewhere else. I wonder how often these features are used compared to wanting to paste the path. "Simple by default..."
Comment 2 Nate Graham 2018-04-26 01:45:40 UTC
Found the actual setting that controls this. It's buried deep in Edit > Settings > Edit Current Profile > Mouse > Disable Drag and drop menu for files and URLs

It is my viewpoint that this should be made the default. I shall submit a patch shortly, and I expect the ensuing discussion to gather quite a few opinions...
Comment 3 Kurt Hindenburg 2018-04-26 02:00:03 UTC
Copy/link/paste all have their places - copy/link act just like using dolphin.

You only get the 'replace' dialog if you dnd file to same location.
Comment 4 Nate Graham 2018-05-03 13:11:39 UTC
Git commit 4752c0923a171daeb56ec0611f81299f11ae31d2 by Nathaniel Graham.
Committed on 03/05/2018 at 13:11.
Pushed by ngraham into branch 'master'.

Paste dropped files and folders as text by default

Summary:
When a user drags a file or folder onto the Konsole window, by far the
most common and likely thing they want to happen is for the path to
that item appear in the window. This is what virtually all other terminal
programs do by default. Konsole does not, and I suspect 99% of its
users do not know that this setting can be turned off, as I did not know
until I started digging through the code itself.

This patch makes the paste-as-text behavior happen by default for new
profiles. Super advanced users can re-enable the drag menu if they like it.
For most Konsole users, I think not having it presents vastly better
drag-and-drop usability and increases the speed of hybrid mouse+gui
operations. As such, I believe this is an important change for {T6831}.

I know changing defaults like this can be scary and controversial, but I
really do believe that the "paste as text" behavior is what 99% of drags
to konsole are intended for. It's not at all like Dolphin where a user may
reasonably want to copy or link instead of move.
FIXED-IN 18.08.0

Test Plan: Make a new user, open Konsole, drag a file or folder to the window; it's immediately pasted as text

Reviewers: #konsole, hindenburg, #vdg

Reviewed By: #konsole, hindenburg

Subscribers: abetts, hein, #plasma

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D12529

M  +1    -1    src/Profile.cpp

https://commits.kde.org/konsole/4752c0923a171daeb56ec0611f81299f11ae31d2