Drag and drop to/from GtkTreeView



    Hi,

I have a question regarding drag and drop with the new TreeView widget.
The quick question is: how can we drag to or drop from an external app ?

The long question follows :-)
By looking at the GtkTreeStore example, it made sense to implement 
GtkTreeDragDestIFace and GtkTreeDragSourceIFace in my own tree model.
Fine, and all works, except one little thing: there's no more 
"info" parameter in drag-data-get and drag-data-received handlers 
signatures. How can we format the data to export if we don't know 
the target ?

I also tried with the old gtk_drag_source_set and such, with 
appropriate handlers, but then, even though this works fine to 
export data, things get sad the other way around: the tree does 
not seem to care about the drag-motion. A quick glance at the source 
gave me the impression that the dnd code in gtktreeview expects 
the model to implement the appropriate interface. Fine, this makes 
sense, but I'm back to my question :-)

So, before spending any more time on the issue, I figured I could 
ask. Have I missed something ? Do I have to make the whole thing 
by hand, even the drag-motion handler ? Do I have to implement 
GtkTreeDragDestIFace but handle the source the old way ? (does not 
look really clean)

Thanks for any info,
Renaud







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]