Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Text version of drag-and-dropped file does not work as expected #373
Deficiencies compared to the way drag-and-drop works when dragging and dropping files from e.g. Nautilus file browser to a terminal window:
With Nautilus the dropped string looks like:
Interesting.. let me test a few things. The relevant code is in
We're using QMimeData.setUrls(list-of-QUrls), and we're definitely not adding the newlines internally. iTerm2 on mac osx handles the drop fine -- the files are separated by spaces and filenames with spaces come out as e.g.
I'll pushed up a version that uses both
Can you try that out and see if there's a difference between both text and urls being present, vs just text? What terminal are you using ~ could it be that its mimedata URL handling code is adding the newlines?
added a commit
Nov 15, 2014
I did a bunch of testing on Linux and I learned quite a few things...
The key thing is the
gnome-terminal, on the other hand, uses text/x-moz-url when present, so we have to make sure that it contains valid data.
terminator breaks in almost all configurations, so I gave up on supporting it.
x-moz-list is automatically added by Qt, but it contains garbage, so we have to create it ourselves. Comparing against nautilus, there's a bunch of other keys (UTF8_STRING, etc) that are emitted, so I am adjusting git-cola to do the same.