After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753392 - listbox: Avoid using show_all on rows
listbox: Avoid using show_all on rows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 753501
 
 
Reported: 2015-08-08 14:51 UTC by Kalev Lember
Modified: 2015-08-12 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
listbox: Avoid using show_all on rows (1.11 KB, patch)
2015-08-08 14:51 UTC, Kalev Lember
committed Details | Review
add some behaviour change documentation (1.16 KB, patch)
2015-08-11 15:16 UTC, David King
committed Details | Review

Description Kalev Lember 2015-08-08 14:51:03 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.
Comment 1 Kalev Lember 2015-08-08 14:51:47 UTC
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.
Comment 2 Matthias Clasen 2015-08-08 15:16:26 UTC
Review of attachment 308949 [details] [review]:

Yes, thats clearly correct.
Hope you're feeling better, too!
Comment 3 Kalev Lember 2015-08-08 15:29:12 UTC
Thanks. Not too bad after stuffing myself full of cold medicine. I'll avoid the conference today though; back tomorrow.
Comment 4 Kalev Lember 2015-08-08 15:30:04 UTC
Attachment 308949 [details] pushed as d6f51ef - listbox: Avoid using show_all on rows
Comment 5 David King 2015-08-11 09:48:00 UTC
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).
Comment 6 Matthias Clasen 2015-08-11 15:00:23 UTC
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.
Comment 7 David King 2015-08-11 15:16:04 UTC
Created attachment 309077 [details] [review]
add some behaviour change documentation

Simple suggested patch, wording open to debate.
Comment 8 Matthias Clasen 2015-08-12 03:23:55 UTC
Review of attachment 309077 [details] [review]:

ok
Comment 9 David King 2015-08-12 11:56:38 UTC
Review of attachment 309077 [details] [review]:

Pushed to master as commit 4a8ff565bc06d52806ea080cdb436a647d923d7c.