Treeview Sorting
| From: | André Jansen | Date: | Sun, 12 Nov 2006 16:37:58 +0000 |
| Subject: | Treeview Sorting | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-7461@lists.php.net to get a copy of this message | ||
Hi all,
I'm working on a database front end, which uses a GtkTreeView to display
search results. The column headers are clickable so I can sort the
results, using the default sorting functions of the GtkListStore. Works
really neat.
Except for one thing: If I happen to do a new search *while the result
list is in a sorted state*, the whole app will freeze and peg the
processor at 100% for as long as several minutes, before the search
results are finally displayed and things turn back to normal.
For the record: my development machine is a PIII 500...
I figure that this behaviour is caused by the list model having to re-
sort each time a new row is inserted. A typical query might return a few
hundred rows.
Therefore, the solution would probably be to reset the list to its
default, unsorted state before a new query is run. How do I do this?
Thanks in advance for any pointers,
--
André
===========================================================
Black Holes were created when God divided by zero.