Re: sorting a clist?
- From: robert havoc pennington <rhpennin midway uchicago edu>
- To: jb <jbnivoit ix netcom com>
- cc: gnome-list gnome org
- Subject: Re: sorting a clist?
- Date: Sun, 28 Jun 1998 01:19:48 -0500 (CDT)
On Sun, 28 Jun 1998, jb wrote:
> The question is in the title... how do i sort a clist on one of its
> columns?
>
Gtk doesn't provide a way. You'd just sort the text and then move the rows
accordingly. There are probably hundreds of possible ways to do it.
Maybe:
Get the text from all the rows and store it
Freeze the list
Clear the list
Sort the text with your favorite algorithm
Add all the rows back in order
Thaw the list.
Freeze/thaw make this look like it all happens at once, the user won't see
the columns disappear and come back one by one.
You could probably sort without recreating rows with swap_rows, but
there's no good reason to I wouldn't think.
Havoc Pennington ==== http://pobox.com/~hp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]