clist changes

It has been virtually impossible in
clist to get information on the selected items because the
clist->selection list, which is suppose to have a  list of the currently
selected items is 1) buggy and 2) actually has pointers to data sturctures
(GtkCListRow) which I inteded to be opaque, and 3) was never properly
syncronized with things like deletes and inserts.  I have changed the
clist->selection so that instead of the data of the list containing
pointers, the data is actually the index of a currently selected row.

Here's a example of deleteing all the selected rows:

list = clist->selection;
while (list)
    row = (gint) list->data;
    list = list->next;

    gtk_clist_remove (GTK_CLIST (clist), row);

once a row is deleted, the list selection list element is gone, so you
have to make sure to do the list->next before doing the removal, the
important thing is all the remaining indexes are adjusted in the
gtk_clist_remove -- the same for any other operation that will change row

Jay Painter -- -- --

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