Hello,
I am learning the pygtk tutorial and try to drag and copy a complete row from one treeview to a empty second, with a gtk.ListStore(int,str,str).

and
finally it works
but
I don't understand why ;-(

I have a few questions.

- in exemple treeviewdnd.py, the row contains only a single string and the description of targets is:
TARGETS = [
        ('MY_TREE_MODEL_ROW', gtk.TARGET_SAME_WIDGET, 0),
        ('text/plain', 0, 1),
        ('TEXT', 0, 2),
        ('STRING', 0, 3),
        ]
Targets is a (or a list of) 3-tuple, OK, but why four tuples in this list for only one string in the model ? And first string in each tuple represent the drag type, is the "drag type" whatever I want to write ? as ('submarine', 0, 0) ?
(with a little more relation with the content, of course)

2nd problem, i have to transform the data of my row (contains integer) on a single string in the callback drag_data_get_data
and retransform piece of string in integer in drag_data_received_data.
Is it the good way to do ?
I see that in SelectionData.set(type, format, data), data is only a string, perhaps my english don't help me to understand really

and 3rd, when I add a gtk.gdk.Pixbuf to the models, I did not make the drag'drop because i dont know how transform an image in string. Here is why, i think i have not understand very well this section of tutorial

If someone can explain more to me, thanks very much,
and if someone can explain to me in french, if my problem is bad translation of tutorial and pygtk reference, thanks very, very, very much.

--
Marie-Claude Collilieux
Bretagne
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to