GNOME Bugzilla – Bug 694945
Add API to reorder stack children
Last modified: 2013-03-01 21:35:22 UTC
This is similar to the reordering API of GtkBox and GtkNotebook. GdStackSwitcher reorders its buttons accordingly.
Created attachment 237726 [details] [review] Implemented gd_stack_reorder_child
Created attachment 237727 [details] [review] Implemented gd_stack_reorder_child This is similar to the reordering API of GtkBox and GtkNotebook. GdStackSwitcher reorders its buttons accordingly.
Created attachment 237733 [details] [review] Implemented gd_stack_reorder_child This is similar to the reordering API of GtkBox and GtkNotebook. GdStackSwitcher reorders its buttons accordingly.
Created attachment 237734 [details] [review] Implemented gd_stack_reorder_child This is similar to the reordering API of GtkBox and GtkNotebook. GdStackSwitcher reorders its buttons accordingly.
Review of attachment 237734 [details] [review]: Thanks, this looks mostly good. Some minor comments below. ::: libgd/gd-stack-switcher.c @@ +157,3 @@ + gtk_box_reorder_child (GTK_BOX (self), button, position); +} + button = g_hash_table_lookup (self->priv->buttons, widget); Extra newline here. ::: libgd/gd-stack.c @@ +59,3 @@ char *title; char *symbolic_icon_name; + guint position; You register the property as int, so this should also be int. @@ +437,3 @@ switch (property_id) { + guint i; Move this also at the top of the function @@ +458,3 @@ + ++i; + } + { How can it happen that get_child_property is called but there are no children? @@ +1028,3 @@ + /* Loop to find the old position and link of child, new link of child and + total number of children. new_link will be NULL if the child should be + GdStackPrivate *priv; We usually use this style for multiline comments: /* Long comment that spans * multiple lines */ @@ +1048,3 @@ + } + + This appears to be unused. ::: libgd/gd-stack.h @@ +82,3 @@ +void gd_stack_reorder_child (GdStack *stack, + GtkWidget *child, + gint position); This should be kept private for now, as for the discussion on IRC.
Created attachment 237737 [details] [review] Implemented gd_stack_reorder_child This is similar to the reordering API of GtkBox and GtkNotebook. GdStackSwitcher reorders its buttons accordingly.
Review of attachment 237737 [details] [review]: Looks good to me, thanks!