Hello. I'm trying to implement Drag and Drop with a TreeView. Here's what I have:

class PlaylistModel(g.ListStore):
  ...snip...
  def drag_data_received(self, dest, selection_data):
    rox.info(str(dest))
    rox.info(str(selection_data))
    return g.FALSE
  def row_drop_possible(self, dest, data):
    return g.TRUE

def window(player):
  ...
  tree=g.TreeView(model=PlaylistModel(player))
  ...
  tree.enable_model_drag_dest([('text/uri-list', 0, 0)], gdk.ACTION_COPY |
gdk.ACTION_MOVE | gdk.ACTION_PRIVATE)

Everything shows up the way it should, but Drag and Drop doesn't work. Drag
and Drop from the inside of the widget is broken, which currently I expect (I
haven't reimplemented the drag source protocols). However, drag and drop from
another application (ROX-Filer, for example), shows up, but does nothing. By
this I mean dragging a file over the TreeView displays where it would be
dropped by drawing a solid line between entries or a dotted one around the
entry, but dropping does nothing. What I expect is for it to pop up two
dialogs showing me what dest and selection_data are, but I get nothing at all.
Any help you can offer me would be greatly appreciated.

Thanks for your time,
-Jeff Cutsinger
_______________________________________________
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