On Mon, 14 Jun 2004 02:49:00 -0700 John Finlay <[EMAIL PROTECTED]>
wrote:

>Here's a small program that prints out the drag targets:
>...

That's exactly what I wanted -- thanks so much. Thanks for taking the
time to reply so thoroughly and helpfully -- and so fast!

> ...
> to add the text targets to your drag destination - something like:
> 
> self.ingTree.enable_model_drag_dest([('text/plain',0,0),
>                                      ('TEXT', 0, 1),
>                                      ('STRING', 0, 2),
>                                      ('COMPOUND_TEXT', 0, 3),
>                                      ('UTF8_STRING', 0, 4)],          
>                                                                     
              
>                                      gtk.gdk.ACTION_DEFAULT |
>                                      gtk.gdk.ACTION_COPY |
>                                      gtk.gdk.ACTION_MOVE)

This does the trick!
 
> Dragging from Netscape I get:
> 
> text/html
> text/unicode
> text/plain

Firefox offers:

text/_moz_htmlcontext
text/_moz_htmlinfo
text/html
text/unicode
text/plain

Interesting detail -- I thought I might prefer text/unicode to
text/plain and made my program ask for it. When I did this, I got three
or four gibberish characters showing up instead of the string I actually
dragged. Oh well.

> gedit uses the TextView widget and doesn't support any of these
> targets. I suspect that Firefox is similar to Netscape and so you
> can't drag from Firefox to gedit and vice versa. You can cut and paste
> between the two. You can use the tutorial program:

Right. I'd consider this a bug. Is there a reason TextView and Entry
widgets couldn't support the text/plain offered by netscape and firefox?
(Of course, the bigger question is, why are there so many ways of saying
the same thing -- is there a difference between TEXT and text/plain?)

> John
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/

Reply via email to