I’m facing an issue with the drag 'n drop feature, in an existing project (gnuradio-companion).
The destination widget (
Gtk.DrawingArea) is set up to receive text:
However the source widget (
Gtk.TreeView) is not set up as a text source, i.e. there is no calls such as:
The application is nevertheless working fine with some test platforms (X11) but fails on mine (macOS/quartz), as the destination widget always receives an empty SelectionData instance - no text, no raw data, no type.
I traced the issue back to the source SelectionData instance whose
set_text() function returns
False if no call to
drag_source_add_text_targets has not been made prior to
Any idea why the feature would work on other platforms and not mine?
drag_source_add_text_targets()call mandatory - or another way to enable text-based selection data may exist/be sufficient?
Has this enforcement been added in a very recent release of PyGTK (from the doc, it seems it has been introduced with v2.6, I’m using gtk v3.24.10), or would it be specific to the GTK backend (X11 vs. Quartz on macOS)?