There is a serious bug in GTK involving the CList.
Near line 2804 of the current GTK gtkclist.c file, there is some
(partially broken, commented out) code.
I have "fixed" the code:
if (clist->focus_row >=0 &&
(row <= clist->focus_row || clist->focus_row >= clist->rows))
clist->focus_row--;
if (clist->focus_row < 0) clist->focus_row = 0;
Why?
Take a CList, set the mode to EXTENDED.
attach a signal handler for control-d that deletes the currently
selected rows (after sorting and reversing, so we delete down->up).
Populate the clist with some data.
select the last row.
hit control-d.
Here is the bug: the focus_row is 1 greater than the number of rows.
Still using the keyboard, hold down shift and tap up-arrow.
release shift.
*bang*, sigseg.
it also works if you select multiple rows, just so long as the last
row highlighted is the last row.
There are also reported problems with going the other direction (ie,
selecting "up", but I've been unable to reproduce that problem.)
This is reproduceable 100% of the time.
The backtrace looks like this:
#0 0x4024b6e0 in resync_selection () from /usr/lib/libgtk-1.2.so.0
#1 0x4024bf4a in end_selection () from /usr/lib/libgtk-1.2.so.0
#2 0x402a1de1 in gtk_marshal_NONE__NONE () from /usr/lib/libgtk-1.2.so.0
#3 0x402d47ad in gtk_signal_real_emit () from /usr/lib/libgtk-1.2.so.0
#4 0x4023589a in gtk_binding_entry_activate () from
/usr/lib/libgtk-1.2.so.0
#5 0x40236843 in gtk_bindings_activate () from /usr/lib/libgtk-1.2.so.0
#6 0x4030c768 in gtk_widget_real_key_release_event ()
from /usr/lib/libgtk-1.2.so.0
#7 0x402a1aec in gtk_marshal_BOOL__POINTER () from
/usr/lib/libgtk-1.2.so.0
#8 0x402d47ad in gtk_signal_real_emit () from /usr/lib/libgtk-1.2.so.0
#9 0x402d2525 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#10 0x4030cb89 in gtk_widget_event () from /usr/lib/libgtk-1.2.so.0
#11 0x403155f3 in gtk_window_key_release_event () from
/usr/lib/libgtk-1.2.so.0
...
--
Pound for pound, the amoeba is the most vicious animal on earth.
Jon Nelson <[EMAIL PROTECTED]>
C and Python Code Gardener
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/