After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700951 - terminal: dragging file from Nautilus should paste file path
terminal: dragging file from Nautilus should paste file path
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-24 11:26 UTC by Adam Dingle
Modified: 2019-03-23 20:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Dingle 2013-05-24 11:26:40 UTC
When I drag a file from Nautilus to a standalone gnome-terminal window, its path gets pasted into the terminal.  That's convenient.  But when I drag to an embedded terminal in gedit, the file opens in a new gedit tab.  It would be nicer if instead the file path were pasted in, just like in an external gnome-terminal.

(By the way, it's also possible to drag files from the gedit file browser, which is another use case for this.)
Comment 1 Ignacio Casal Quinteiro (nacho) 2013-05-24 12:14:51 UTC
mmm, not sure about this.... while I like the idea it would mean to drop the feature where you can drop a file not only in the view but in the rest of the window.
Comment 2 Adam Dingle 2013-05-24 12:16:36 UTC
I also don't want to drop that feature!  I think if you drop in the terminal it should paste the path, but if you drop elsewhere it should open the file.  Not sure how easy that would be.  :)
Comment 3 Ignacio Casal Quinteiro (nacho) 2013-05-24 12:19:25 UTC
I have to check more... maybe we would need some kind of extension point in the window to handle the drop... dunno I will have to ask somebody with more experience in drag and drop. pbor?
Comment 4 Ignacio Casal Quinteiro (nacho) 2013-05-24 13:02:16 UTC
So I was thinking a bit more on this, we can simply have our own subclass of VteTerminal and handle the drag and just chain up if it is different than a uri what we get. This is similar to what we do right now in GeditView.
Comment 5 Ignacio Casal Quinteiro (nacho) 2013-05-24 15:16:22 UTC
Can you please try it out?
Comment 6 Adam Dingle 2013-05-25 10:35:15 UTC
I tried out your change.  Looks promising, but when I drag into the embedded terminal, it pastes in a URL like this:

   'file:///home/adam/foo'

But when I drag from Nautilus into an external gnome-terminal, I get this:

   '/home/adam/foo' 

This latter form is more useful.  Can we make the embedded terminal paste that?
Comment 7 Ignacio Casal Quinteiro (nacho) 2013-05-26 08:58:45 UTC
I don't know how I missed that, thanks for pointing it out. Now it should be fixed.
Comment 8 Adam Dingle 2013-05-26 12:27:56 UTC
Working great now - thanks!