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 732175 - shell: Fix list box scrolling helper
shell: Fix list box scrolling helper
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-24 17:06 UTC by Rui Matos
Modified: 2014-06-25 16:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell: Fix list box scrolling helper (10.97 KB, patch)
2014-06-24 17:06 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2014-06-24 17:06:44 UTC
The new helpers are a great and overdue cleanup but this one wasn't
working correctly.

Note that GtkBox doesn't work as a parent for the GtkScrolledWindow
in this case since the preferred height is always the minimum for that
container.
Comment 1 Rui Matos 2014-06-24 17:06:48 UTC
Created attachment 279131 [details] [review]
shell: Fix list box scrolling helper

GtkListBox doesn't implement GtkScrollable so it needs to be added to
a GtkViewport. Instead of having to do this in all .ui files, add a
new helper function to setup the widget tree correctly.
Comment 2 Bastien Nocera 2014-06-25 09:17:19 UTC
Review of attachment 279131 [details] [review]:

Looks good. Sorry about the mess.

::: shell/list-box-helper.c
@@ +93,3 @@
+
+  g_object_set_data (G_OBJECT (listbox), "cc-scrolling-parent", parent);
+  g_object_set_data (G_OBJECT (listbox), "cc-scrolling-scroll-window", scrolled_window);

scrolled-window
Comment 3 Rui Matos 2014-06-25 16:27:15 UTC
Attachment 279131 [details] pushed as 61a6c6f - shell: Fix list box scrolling helper