Well, I have to say that I finally found the way. This one has driven me
nuts for some days...

The thing was that on the 'treeview_copy_row' function, the
gtk.TREE_VIEW_DROP_BEFORE and gtk.TREE_VIEW_DROP_AFTER drop_positions
were not of my interest :)

Thanks anyway!
-- 
jors <[email protected]>



El dom, 16-05-2010 a las 21:21 +0200, jors escribió:
> Hi there people,
> 
> I'm new in this list (this is my first post) and I'm also new at pygtk,
> so it was clear someday I was going to come to you guys :)
> 
> The thing is I want to do a 2-level tree with a TreeView, each level
> having different node types:
> 
> - The 1st level will contain "folders". They should be able to contain
> entries (leaf nodes), but they may not be moved/drag'n'dropped anywhere.
> 
> - The 2nd level will contain "leafs". They may not have any child (other
> leafs). They must be always contained inside a 1st level node, but can
> be moved/drag'n'dropped to any 1st level node.
> 
> The problem is I don't know how to avoid drag'n'dropping leafs to the
> top level. This would not be a problem if the tree maintained it's
> consistency, but it does not. For example, if I move a leaf at the 1st
> level, the leaf gets copied instead of moved (even if I have defined
> drag'n'drops as MOVES!).
> 
> I'm attaching a functional PoC to let you test what I'm trying to
> explain. Just run it, drag'n'drop a leaf node to put it in the 1st level
> (the same level as "folders") and see that it creates a copy. Even when
> you drag'n'drop this last copy inside a 1st level node, it will create
> another copy.
> 
> PS. JFYI, this won't be a filesystem mapping, but a hierarchy of
> categories (root nodes) containing rss/feeds (leaf nodes). Hope I have
> been clear enough.
> 
> Hope hearing from you soon,

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to