CList/CTree emit select_row for non-selectable rows

The GtkCList and GtkCTree widgets emit select_row signals even when the
user clicks on a row whose selectable flag has been set to false with
gtk_clist_set_selectable. The widgets correctly don't actually select
the widget, they only emit this signal, which makes using that signal
quite awkward if some rows are not selectable because you have to test
the selectability of the row in question manually. It looks like a bug
to me.

here's a short pygtk program to illustrate this (gnome-python-1.0.51):

from gtk import *

window = GtkWindow()
window.connect('destroy', lambda *args: mainquit())

clist = GtkCList(1, ('column',))
for i in range(10):
    clist.append(('row' + `i`,))
    clist.set_selectable(i, 0)


def select_row(*args):
    print 'select_row'
clist.connect("select_row", select_row)


Bernhard Herzog   | Sketch, a drawing program for Unix  |

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