GNOME Bugzilla – Bug 776012
GtkFlowBox, GtkListBox: Don't emit selected-rows-changed, selected-children-changed, etc. during destruction
Last modified: 2017-01-12 15:00:33 UTC
Created attachment 341843 [details] Sample program for GtkFlowBox GtkFlowBox emits selected-children-changed during destruction. This can be problematic. Imagine a MyFlowBox that updates itself during selected-children-changed. During destruction the innards of the class won't be usable and the signal handler has to be explicitly disconnected.
Created attachment 341844 [details] [review] flowbox: Don't emit selected-children-changed during destruction
Review of attachment 341844 [details] [review]: Does listbox do the same ? Does treeview ? This feels like something that we should have a general policy about. Absent one, it seems the right thing to do.
From reading gtk/gtklistbox.c and various code that uses it, I do think GtkListBox also has the same problem. However, I am still in GtkFlowBox-land in terms of libgd, so I haven't gotten to GtkListBox yet. I don't know about GtkTreeView. In the past, we have at least fixed GtkStack (bug 749012 and bug 724506) in a similar way.
Created attachment 342153 [details] [review] listbox: Don't emit selected-rows-changed, etc. during destruction
Created attachment 342154 [details] Sample program for GtkListBox
Review of attachment 341844 [details] [review]: .
Review of attachment 342153 [details] [review]: .
Comment on attachment 341844 [details] [review] flowbox: Don't emit selected-children-changed during destruction Pushed to both master and gtk-3-22.
Comment on attachment 342153 [details] [review] listbox: Don't emit selected-rows-changed, etc. during destruction Pushed to both master and gtk-3-22.