Message-ID: <42F74918.4090503 at ath.cena.fr> Date: Mon, 08 Aug 2005 13:59:20 +0200 From: Yann LE FABLEC MIME-Version: 1.0 To: LablGTK Mailing List Subject: How to temporarily disable GTree sorting ? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Dear all, I am trying to use GTree.view/model in order to display informations as a list. Everything works fine except when I use sorting : 1. First, I create a model + a view, insert my elements in the model 2. Using set_sort_func & set_sort_column_id I tell the view to allow the user to sort data in the GTree.view. 3. Then later I want to display new data in my model/view : I first detach the model from the view, clear the model and insert my new elements. The problem is that this third step is extremely slow as, as stated in the Tree View tutorial, the elements are sorted after each insertion. In this tutorial, one can read that to get rid of that slowdown problem, one has to "make sure that sorting is disabled while you are doing your mass insertions". (See : http://compiler.kaist.ac.kr/~shoh/ocaml/lablgtk2/treeview-tutorial/ch03s03.html#sec-treestore-adding-many-rows). I can't find the way to achieve this. I have searched through this mailing-list, on Internet, in the GTK+-2.0 C API reference but I was not able to find how to temporarily disable the tree sorting while I insert new elements in it. Does someone know how to do this ??? Help would be greatly appreciated, Yann.