GNOME Bugzilla – Bug 703544
drag-and-drop doesn't work from some filers
Last modified: 2013-07-28 23:52:14 UTC
Dragging-and-dropping from some filers (e.g. PCmanfm) into Frogr doesn't work. These filers can drag-and-drop to other programs (e.g. mypaint, mtpaint).
Thanks for the report. It would be great to get it fixed before the next release.
FYI this is from a pcmanfm developer: We support dragging files as URI list and as plain text list. If frogr doesn't support any of those types then I don't know how to help it. I would like you to ask from frogr developers how they expect drag-and-drop to work. Thank you very much. http://sourceforge.net/tracker/?func=detail&atid=801864&aid=3614629&group_id=156956
Well, I haven't had time to give this much thought, so quick answer is that I have no idea yet on how to fix it in frogr (or whether it's fixable at all, fwiw), and that I was just planning on reproducing the issue and try to find a solution as soon as I have some free time for it. Not sure whether you're meaning there's nothing we can do from frogr side, though. In any case, any advice you can provide on the right direction would be highly appreciated. Thanks
Hi again, this is what the pcmanfm developer says: Oh, I believe I know what is incorrect in their code. They assume that primary target should be always URI but in some cases it might be not. Instead of using gtk_selection_data_get_target() followed by gtk_targets_include_uri() they should use gtk_selection_data_targets_include_uri(), and also use gtk_selection_data_get_uris() instead of gtk_selection_data_get_data() followed by g_strsplit(). That will not only simplify their code but also fix problem not only with pcmanfm but also allow drop from other programs which support URI but not as primary target. :)
Hi Alister, Using gtk_selection_data_get_uris() instead of gtk_selection_data_get_data() followed by g_strsplit() does actually fix the issue. I've tested it locally with pcmanfm and it definitely works now. Thus, I've already fixed this in master. See the commit here: https://git.gnome.org/browse/frogr/commit/?id=a886b944401e0a024747873d318fdc67a4b26180 Thanks a lot for the investigation and your help fixing this!
Great, thanks.