DnD semantics sensitive to order of GtkTargetEntry list?

I have a very simple Python script that does DnD from one GtkEntry widget to
another.  I was kind of perplexed that when dragging when a selection was
active, nothing was getting copied.  I finally isolated the problem to the
ordering of the elements in the target entry lists passed to
gtk_drag_source_set and gtk_drag_dest_set.  If the list is ordered like so:

        ('STRING', 0, 0),
        ('text/plain', 0, 0),
        ('application/x-rootwin-drop', 0, 1)

the copy works.  (PyGtk2 takes care of mapping the tuples to GtkTargetEntry
objects automatically.)  If I reverse the order of the first two elements:

        ('text/plain, 0, 0),
        ('STRING', 0, 0),
        ('application/x-rootwin-drop', 0, 1)

no selection copies happen.  The documentation for gtk_drag_dest_set and
gtk_drag_source_set say nothing about any ordering dependencies in these
lists.  In addition, I could have sworn I read somewhere that the type field
was supposed to be a MIME type.  What's "STRING" needed for anyway?


Skip Montanaro (skip pobox com)

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