Hello -- I'm working with drag and drop and finding some frustrations.
I've noticed that text buffers and entry boxes have drag-n-drop enabled
by default. If I open gedit, type some text and drag it across into my
pygtk app, the text shows up in the widget without me having to do any
coding.
However, if I open Mozilla Firefox and drag text, I'm out of luck -- the
Entry and Textview widgets don't accept it.
Now here's the kicker: I have set up a treeView to accept drag-and-drop
text on my own, basing my code on the TreeView tutorial (thanks!). My
TreeView will accept text dragged from firefox, but not text dragged
from gedit.
So, I imagine this means that firefox and gedit are offering up
different types of selections. Of course, I would like to handle
any kind of selection that I can turn into plain text. Perhaps the vital
lines are...
self.ingTree.enable_model_drag_dest([('text/plain',0,0)],
gtk.gdk.ACTION_DEFAULT |
gtk.gdk.ACTION_COPY |
gtk.gdk.ACTION_MOVE)
Now I would think that gedit and other programs would be
offering up some variant of text/plain. So my question is: what are they
offering up? Can some point me to documentation of dnd types, etc. Is
there a simple way to create a pygtk test program that will tell
me what formats a selection I drag onto it is offering up?
thanks,
Tom
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/