mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
sizegroup: Merge function into only caller
This commit is contained in:
parent
b5dfe9b833
commit
4fa74e68e9
@ -214,53 +214,6 @@ queue_resize_on_group (GtkSizeGroup *size_group)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
queue_resize_on_widget (GtkWidget *widget,
|
||||
gboolean check_siblings)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
|
||||
parent = widget;
|
||||
|
||||
do
|
||||
{
|
||||
if (gtk_widget_get_resize_needed (parent))
|
||||
return;
|
||||
|
||||
gtk_widget_queue_resize_on_widget (parent);
|
||||
|
||||
if (!check_siblings)
|
||||
{
|
||||
check_siblings = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
GSList *groups, *l;
|
||||
|
||||
groups = _gtk_widget_get_sizegroups (parent);
|
||||
|
||||
for (l = groups; l; l = l->next)
|
||||
{
|
||||
if (((GtkSizeGroup *) (l->data))->priv->ignore_hidden && !gtk_widget_is_visible (widget))
|
||||
continue;
|
||||
|
||||
queue_resize_on_group (l->data);
|
||||
}
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
if (GTK_IS_RESIZE_CONTAINER (parent))
|
||||
{
|
||||
gtk_container_queue_resize_handler (GTK_CONTAINER (parent));
|
||||
break;
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
parent = _gtk_widget_get_parent (parent);
|
||||
}
|
||||
while (parent);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_size_group_class_init (GtkSizeGroupClass *klass)
|
||||
{
|
||||
@ -575,7 +528,40 @@ gtk_size_group_get_widgets (GtkSizeGroup *size_group)
|
||||
void
|
||||
_gtk_size_group_queue_resize (GtkWidget *widget)
|
||||
{
|
||||
queue_resize_on_widget (widget, TRUE);
|
||||
GtkWidget *parent;
|
||||
GSList *groups, *l;
|
||||
|
||||
parent = widget;
|
||||
|
||||
do
|
||||
{
|
||||
if (gtk_widget_get_resize_needed (parent))
|
||||
return;
|
||||
|
||||
gtk_widget_queue_resize_on_widget (parent);
|
||||
|
||||
|
||||
groups = _gtk_widget_get_sizegroups (parent);
|
||||
|
||||
for (l = groups; l; l = l->next)
|
||||
{
|
||||
if (((GtkSizeGroup *) (l->data))->priv->ignore_hidden && !gtk_widget_is_visible (widget))
|
||||
continue;
|
||||
|
||||
queue_resize_on_group (l->data);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
if (GTK_IS_RESIZE_CONTAINER (parent))
|
||||
{
|
||||
gtk_container_queue_resize_handler (GTK_CONTAINER (parent));
|
||||
break;
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
parent = _gtk_widget_get_parent (parent);
|
||||
}
|
||||
while (parent);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
Loading…
Reference in New Issue
Block a user