GNOME Bugzilla – Bug 315528
Drag and drop support
Last modified: 2011-01-20 22:21:07 UTC
Meld should have Drag and Drop support. Example: I would like to choose three files in Nautilus and then drop them onto Meld. Meld should then figure out that this is a three file comparison - if two files, Meld discovers this too. The same with directories. If I just drop a single directory, Meld should find out if this is a CVS or Subversion directory. If it isn't Meld probably should give an error message
I could be interested in contribute to this issue and I have been looking at the DnD API for GTK, but I'm a bit unsure where to start with this issue when it comes to Meld. If anyone would like to help/mentor me, I might be able to implement this feature.
I would really *love* this feature. No more silly file chooser dialogs. Just pure usability :) this will solve World Hunger, I am certain! It's a shame I can't implement that myself (IANAD).
Created attachment 86487 [details] [review] Small patch which enables Drag And Drop This patch have some issues: - Uses gnomevfs module which might be problematic since Meld is a GTK app (see misc.py). The patch uses only a simple function (get_local_path_from_uri) and this could probably be implemented without using gnomevfs. - The "grey area" when there isn't any open diffs doesn't support DnD. One must drag to the toolbar. How do I fix this? - When dragging one file, I would like to open the "new" dialog so I can choose the other file.
bug 350665 was just fixed, which should be relevant to Trond's patch in comment #3.
Not sure if there is an interest for adding drag-and-drop support. If Meld require newer version of g* libraries, we could probably avoid the gnomevfs dependency with using gvfs.
Thanks Trond, I've committed your patch. One strangeness I've found is that gnome desktop entries "x-nautilus-desktop://..." cause a runtime error in gnomevfs.get_local_path_from_uri. How should this be correctly handled?
This does not seem to be working in Meld 1.2. Gnome 2.26.1 Nautilus 2.26.2 (via distribution Ubuntu 9.04)
I've been running on Ubuntu 9.04 without any problems towards both two files and a subversion directory. Could anyone give me an scenario which provokes an crash.
This is working for me in current Meld, and should have been working for a while. The gnomevfs issue is no longer relevant, as we use gio from Meld 1.5.0 onwards. If there are any outstanding issues with drag and drop, please open new bugs.