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 650487 - Sync allocation in ClutterBoxLayout with the one in GtkBox
Sync allocation in ClutterBoxLayout with the one in GtkBox
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-18 14:11 UTC by Tomeu Vizoso
Modified: 2011-06-07 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sync allocation in ClutterBoxLayout with the one in GtkBox (20.70 KB, patch)
2011-05-18 14:11 UTC, Tomeu Vizoso
none Details | Review
Sync allocation in ClutterBoxLayout with the one in GtkBox (20.74 KB, patch)
2011-05-19 08:11 UTC, Tomeu Vizoso
none Details | Review
Sync allocation in ClutterBoxLayout with the one in GtkBox (20.81 KB, patch)
2011-05-19 08:53 UTC, Tomeu Vizoso
none Details | Review
Sync allocation in ClutterBoxLayout with the one in GtkBox (20.92 KB, patch)
2011-05-19 09:37 UTC, Tomeu Vizoso
reviewed Details | Review
Sync allocation in ClutterBoxLayout with the one in GtkBox (20.82 KB, patch)
2011-05-25 06:44 UTC, Tomeu Vizoso
committed Details | Review

Description Tomeu Vizoso 2011-05-18 14:11:23 UTC
.
Comment 1 Tomeu Vizoso 2011-05-18 14:11:25 UTC
Created attachment 188026 [details] [review]
Sync allocation in ClutterBoxLayout with the one in GtkBox
Comment 2 Tomeu Vizoso 2011-05-19 08:11:59 UTC
Created attachment 188098 [details] [review]
Sync allocation in ClutterBoxLayout with the one in GtkBox

Fixes issue that wasn't visible in the tests because all items have the same size
Comment 3 Tomeu Vizoso 2011-05-19 08:53:48 UTC
Created attachment 188102 [details] [review]
Sync allocation in ClutterBoxLayout with the one in GtkBox

Restores the animations
Comment 4 Tomeu Vizoso 2011-05-19 09:37:35 UTC
Created attachment 188103 [details] [review]
Sync allocation in ClutterBoxLayout with the one in GtkBox

Don't overwrite the initial allocation
Comment 5 Emmanuele Bassi (:ebassi) 2011-05-24 15:55:37 UTC
Review of attachment 188103 [details] [review]:

::: clutter/clutter-box-layout.c
@@ +651,3 @@
+    box_child->x_fill,
+    box_child->y_fill,
+    flags);

this does not conform to the coding style; align to the first argument.

@@ +756,3 @@
+  *visible_children = *expand_children = 0;
+
+{

you're leaking the list of children here

@@ +880,3 @@
+      gint glue = (extra_space + i) / (i + 1);
+      gint gap = sizes[(spreading[i])].natural_size
+/*

should align the '-' to the '=' on the line above.

@@ +933,2 @@
+  /* Retrieve desired size for visible children. */
+  for (i = 0, children = clutter_container_get_children (container);

leaking the children list here as well.

@@ +1069,3 @@
+          child_size = sizes[i].minimum_size;
+
+        }

should probably use a ClutterBoxChild* variable at the beginning of the for block, to avoid multiple casting.
Comment 6 Tomeu Vizoso 2011-05-25 06:44:52 UTC
Created attachment 188555 [details] [review]
Sync allocation in ClutterBoxLayout with the one in GtkBox

Addresses issues mentioned in the review.
Comment 7 Emmanuele Bassi (:ebassi) 2011-06-07 13:45:08 UTC
Attachment 188555 [details] pushed as e636a0b - Sync allocation in ClutterBoxLayout with the one in GtkBox

I did a minor edit, removing an unused variable to avoid the corresponding compiler warning.