Instead of manually doing it everywhere, just call set_object (NULL) from the selection_changed handler. Fix all the set_object() functions to deal with NULL.
Instead of manually doing it everywhere, just call set_object (NULL) from the selection_changed handler. Fix all the set_object() functions to deal with NULL.