sizegroup: Refactor function

This commit is contained in:
Benjamin Otte 2015-09-18 03:41:12 +02:00
parent dd0e5cfce6
commit 0721d964e4

View File

@ -242,10 +242,12 @@ queue_resize_on_widget (GtkWidget *widget,
GSList *widget_groups; GSList *widget_groups;
GHashTableIter iter; GHashTableIter iter;
gpointer current; gpointer current;
if (widget == parent)
real_queue_resize (widget);
if (widget == parent && !check_siblings) if (widget == parent && !check_siblings)
{ {
real_queue_resize (widget);
parent = _gtk_widget_get_parent (parent); parent = _gtk_widget_get_parent (parent);
continue; continue;
} }
@ -253,9 +255,6 @@ queue_resize_on_widget (GtkWidget *widget,
widget_groups = _gtk_widget_get_sizegroups (parent); widget_groups = _gtk_widget_get_sizegroups (parent);
if (!widget_groups) if (!widget_groups)
{ {
if (widget == parent)
real_queue_resize (widget);
parent = _gtk_widget_get_parent (parent); parent = _gtk_widget_get_parent (parent);
continue; continue;
} }
@ -269,8 +268,7 @@ queue_resize_on_widget (GtkWidget *widget,
{ {
if (current == parent) if (current == parent)
{ {
if (widget == parent) /* do nothing */
real_queue_resize (parent);
} }
else if (current == widget) else if (current == widget)
{ {