GNOME Bugzilla – Bug 753392
listbox: Avoid using show_all on rows
Last modified: 2015-08-12 11:56:55 UTC
I am trying to use listbox with liststore in my app. It works roughly fine, except that I am unable to control the visibility of the children in my GtkListBoxRow subclass. If I set their visibility to false, they are still always shown. The same works fine with a regular listbox that's not backed by a liststore.
Created attachment 308949 [details] [review] listbox: Avoid using show_all on rows Don't use gtk_widget_show_all() on row widgets because that would unconditionally show all of it's children. This might be unwanted in case the row implementation wants to keep some of its children hidden. This commit changes it to use show() instead of show_all() and relies on the row widget to control the visibility of its children itself as appropriate.
Review of attachment 308949 [details] [review]: Yes, thats clearly correct. Hope you're feeling better, too!
Thanks. Not too bad after stuffing myself full of cold medicine. I'll avoid the conference today though; back tomorrow.
Attachment 308949 [details] pushed as d6f51ef - listbox: Avoid using show_all on rows
This broke gnome-logs, so that the event view rows are now empty, in bug 753501. It's an easy, one-line fix to show the rows, but I am a bit concerned about the change in behaviour. Can this be pointed out in the NEWS file (and/or the documentation?)? I would be happy to add a sentece to the API reference (maybe for GtkListBoxCreateWidgetFunc).
yes, that would be a good idea. The right place for such compat concerns is README.in more than NEWS (I'm linking to that in my .0 release announcements), but adding a hint to the documentation of that create func sounds great too.
Created attachment 309077 [details] [review] add some behaviour change documentation Simple suggested patch, wording open to debate.
Review of attachment 309077 [details] [review]: ok
Review of attachment 309077 [details] [review]: Pushed to master as commit 4a8ff565bc06d52806ea080cdb436a647d923d7c.