TreeView, only one top-level row and sorting bug



Hello,

        I'm developping  an application using Gtk+ 2.0,  and I'm using
some  GtkTreeView with GtkTreeModel  with a  depth of  2 (one  or more
top-level  "category"  rows containing  zero  or  more  data rows)  as
underlying model.  I'm using

      gtk_tree_view_column_set_sort_column_id (col, id);

to allow the user  to sort by the value of column  (all the columns on
my model are G_TYPE_STRING).

       It works  fine when there are  more than one  top-level rows in
the model, but when there is only one top-level row (with some childs)
the sorting  isn't done. The  arrow is displayed  when I click  on the
column,  and data  is  sorted if  I,  for example,  resize the  window
containing the GtkTreeView, but not when I click on the column.

      A screenshot is at http://kilobug.free.fr/gtk-tree-view.jpg.  On
this screenshot, there  are two windows with widgets  creates the same
way, one with  multiple top-levels rows (and sorting  works) the other
with only one top-level row and buggy sorting. I've tried to tweak the
data to make  the "modules" window have only  one top-level group, and
then it becomes buggy like the "players" window.

     I'm not sure it's  a gtk+ bug, but it may be  one. I could try to
give you a simple piece of code that shows it, but my program is a bit
too complex... and  I'm not sure I'm allowed by  company to release it
before it is finished (but it'll be GPLed then, don't worry ;) ).

     I use gtk+ 2.0.9 from Debian Sid.

Thank you for reading this :)

-- 
Gael Le Mignot "Kilobug" - kilobug freesurf fr - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org



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