clist bug



I have a clist in a notebook. On another page of the notebook is a button
that adds a row to the clist on the first page. My problem is that when
I click this button and switch back to the first page, the clist's
scrollbars arent updated to let me scroll to see this new row I just
added.

All I'm doing is inserting a row and setting some data to it. no freezes,
no thaws, etc..

I looked at gtkclist.c from http://cvs.gnome.org/lxr/source/gtk+/gtk/gtkclist.c

At the very end of the function real_insert_row(), on line 2394, I see this:

2394   /* redraw the list if it isn't frozen */
2395   if (!GTK_CLIST_FROZEN (clist))
2396     {
2397       adjust_scrollbars (clist);
2398 
2399       if (gtk_clist_row_is_visible (clist, row) != GTK_VISIBILITY_NONE)
2400         draw_rows (clist, NULL);
2401     }

Now, the clist is not frozen by me, so I assume hiding it by switching
notebook pages freezes it.

I have discovered a workaround however, and that is to always call
gtk_clist_thaw() after adding the rows. That forces the scrollbar to be
updated.

-- 
___________________________________________________________________________
Danny Dulai                                           Feet. Pumice. Lotion.
http://www.ishiboo.com/~nirva/                            nirva@ishiboo.com



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