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 703544 - drag-and-drop doesn't work from some filers
drag-and-drop doesn't work from some filers
Status: RESOLVED FIXED
Product: frogr
Classification: Other
Component: UI
0.8
Other Linux
: Normal normal
: ---
Assigned To: frogr maintainers
frogr maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-03 13:37 UTC by Alister
Modified: 2013-07-28 23:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alister 2013-07-03 13:37:09 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).
Comment 1 Mario Sánchez Prada 2013-07-03 13:47:14 UTC
Thanks for the report. It would be great to get it fixed before the next release.
Comment 2 Alister 2013-07-07 13:21:56 UTC
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
Comment 3 Mario Sánchez Prada 2013-07-08 08:27:43 UTC
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
Comment 4 Alister 2013-07-24 14:11:49 UTC
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. :)
Comment 5 Mario Sánchez Prada 2013-07-27 09:47:59 UTC
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!
Comment 6 Alister 2013-07-28 23:52:14 UTC
Great, thanks.