Thanks for the reply. Now, I can drag n drop in the treeview but, for a completely unknown reason, the signals are not emitted anymore !<br><br>What could block row-changed and row-deleted signal ?<br><br><div class="gmail_quote">
On Tue, Jan 27, 2009 at 7:04 PM, Karl Ostmo <span dir="ltr">&lt;<a href="mailto:kostmo@gmail.com">kostmo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Tue, Jan 27, 2009 at 8:56 AM, Lionel Dricot <span dir="ltr">&lt;<a href="mailto:zeploum@gmail.com" target="_blank">zeploum@gmail.com</a>&gt;</span> wrote:<br></div></div><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hello,<br><br>I&#39;m displaying a TreeStore in a TreeView and I want to allow the user to re-organize its data by drag-n-dropping.<br><br>( If you want to try, the code is available with &quot;bzr branch lp:gtg&quot; in taskbrowser/browser.py. I will specify the line.<br>


&nbsp;If I give you a given rev. number $X, type, after branching, &quot;bzr revert -r $X&quot;&nbsp; use &quot;./debug.sh&quot; to launch the soft with a dummy data set )<br><br>In order to handle drag-n-drop, I connect to the row-changed and row-deleted signal to the function that will update my datas to reflect the change (rev.123,li 675)<br>


<br><br>It was working fine until my co-coder fixed some sorting bugs (typically, we display strings but we want to sort them as integer or date).<br><br>Between rev. 108 and rev. 109, drag-n-dropping stopped working. The tree just refuses you to drag-n-drop.<br>


<br>I&#39;ve looked and found that commenting one line added during this commit was causing the problem :<br><br>self.treestore.set_sort_column_id (2, gtk.SORT_ASCENDING (rev.109,li 113)<br><br>Commenting this line restore drag-n-drop. Re-enabling it break the feature.<br>


<br>So, why such a behaviour ? I&#39;m sure there&#39;s something I don&#39;t understand about drag-n-drop and sorting. Can anyone explain to me how I can keep this line and restore drag-n-drop functionnality ?<br><br>Thanks in advance,<br>

<font color="#888888">
<br>Lionel<br></font><br><br>PS: in rev.123 this line is now in taskbrowser/treetools.py, li 19<br>
<br></div></div>_______________________________________________<br>
pygtk mailing list &nbsp; <a href="mailto:pygtk@daa.com.au" target="_blank">pygtk@daa.com.au</a><br>
<a href="http://www.daa.com.au/mailman/listinfo/pygtk" target="_blank">http://www.daa.com.au/mailman/listinfo/pygtk</a><br>
Read the PyGTK FAQ: <a href="http://faq.pygtk.org/" target="_blank">http://faq.pygtk.org/</a><br></blockquote></div><br><br clear="all"><a href="http://faq.pygtk.org/index.py?req=show&amp;file=faq13.049.htp" target="_blank">http://faq.pygtk.org/index.py?req=show&amp;file=faq13.049.htp</a><br>


<br>
HTH,<br>
Karl<br><font color="#888888"><br>-- <br>Code or be coded.<br>
</font></blockquote></div><br>