Roger Leigh <roger whinlatter uklinux net> writes:
Depending on whether there is a selected row in the TreeView, I have
some [of the] buttons set insensitive. In order to keep them in the
correct state, I attached a handler to the signal_changed() signal
of the Selection. This works, but... when I call
Gtk::ListStore::clear() to clear the list, the Selection doesn't
emit a "changed" signal, even though its selection has been lost...
What is the best way to deal with this?
I solved this my manually calling my Gtk::TreeSelection
"signal_changed" callback after clearing the list. Is the "changed"
signal only emitted due to /user/ interaction with the TreeView? If
so, is there any way of detecting changes to the Selection due to
changes in the underlying ListStore?