1 /* GTK - The GIMP Toolkit
3 * Copyright (C) 2001 Red Hat Software
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
23 #include "gtkcontainer.h"
25 #include "gtkprivate.h"
26 #include "gtksizegroup.h"
27 #include "gtkbuildable.h"
28 #include "gtkextendedlayout.h"
31 #define GTK_SIZE_GROUP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_SIZE_GROUP, GtkSizeGroupPrivate))
33 typedef struct _GtkSizeGroupPrivate GtkSizeGroupPrivate;
35 struct _GtkSizeGroupPrivate
37 GtkRequisition natural_size;
46 static void gtk_size_group_set_property (GObject *object,
50 static void gtk_size_group_get_property (GObject *object,
55 static void add_group_to_closure (GtkSizeGroup *group,
56 GtkSizeGroupMode mode,
59 static void add_widget_to_closure (GtkWidget *widget,
60 GtkSizeGroupMode mode,
65 static void gtk_size_group_buildable_init (GtkBuildableIface *iface);
66 static gboolean gtk_size_group_buildable_custom_tag_start (GtkBuildable *buildable,
70 GMarkupParser *parser,
72 static void gtk_size_group_buildable_custom_finished (GtkBuildable *buildable,
78 static GQuark size_groups_quark;
79 static const gchar size_groups_tag[] = "gtk-size-groups";
81 static GQuark visited_quark;
82 static const gchar visited_tag[] = "gtk-size-group-visited";
85 get_size_groups (GtkWidget *widget)
87 return g_object_get_qdata (G_OBJECT (widget), size_groups_quark);
91 set_size_groups (GtkWidget *widget,
94 g_object_set_qdata (G_OBJECT (widget), size_groups_quark, groups);
98 mark_visited (gpointer object)
100 g_object_set_qdata (object, visited_quark, "visited");
104 mark_unvisited (gpointer object)
106 g_object_set_qdata (object, visited_quark, NULL);
110 is_visited (gpointer object)
112 return g_object_get_qdata (object, visited_quark) != NULL;
116 add_group_to_closure (GtkSizeGroup *group,
117 GtkSizeGroupMode mode,
123 *groups = g_slist_prepend (*groups, group);
124 mark_visited (group);
126 tmp_widgets = group->widgets;
129 GtkWidget *tmp_widget = tmp_widgets->data;
131 if (!is_visited (tmp_widget))
132 add_widget_to_closure (tmp_widget, mode, groups, widgets);
134 tmp_widgets = tmp_widgets->next;
139 add_widget_to_closure (GtkWidget *widget,
140 GtkSizeGroupMode mode,
146 *widgets = g_slist_prepend (*widgets, widget);
147 mark_visited (widget);
149 tmp_groups = get_size_groups (widget);
152 GtkSizeGroup *tmp_group = tmp_groups->data;
154 if ((tmp_group->mode == GTK_SIZE_GROUP_BOTH || tmp_group->mode == mode) &&
155 !is_visited (tmp_group))
156 add_group_to_closure (tmp_group, mode, groups, widgets);
158 tmp_groups = tmp_groups->next;
163 real_queue_resize (GtkWidget *widget)
165 GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
166 GTK_PRIVATE_SET_FLAG (widget, GTK_REQUEST_NEEDED);
169 _gtk_container_queue_resize (GTK_CONTAINER (widget->parent));
170 else if (GTK_WIDGET_TOPLEVEL (widget) && GTK_IS_CONTAINER (widget))
171 _gtk_container_queue_resize (GTK_CONTAINER (widget));
175 reset_group_sizes (GSList *groups)
177 GSList *tmp_list = groups;
180 GtkSizeGroup *tmp_group = tmp_list->data;
182 tmp_group->have_width = FALSE;
183 tmp_group->have_height = FALSE;
185 tmp_list = tmp_list->next;
190 queue_resize_on_widget (GtkWidget *widget,
191 gboolean check_siblings)
193 GtkWidget *parent = widget;
198 GSList *widget_groups;
202 if (widget == parent && !check_siblings)
204 real_queue_resize (widget);
205 parent = parent->parent;
209 widget_groups = get_size_groups (parent);
212 if (widget == parent)
213 real_queue_resize (widget);
215 parent = parent->parent;
222 add_widget_to_closure (parent, GTK_SIZE_GROUP_HORIZONTAL, &groups, &widgets);
223 g_slist_foreach (widgets, (GFunc)mark_unvisited, NULL);
224 g_slist_foreach (groups, (GFunc)mark_unvisited, NULL);
226 reset_group_sizes (groups);
231 if (tmp_list->data == parent)
233 if (widget == parent)
234 real_queue_resize (parent);
236 else if (tmp_list->data == widget)
238 g_warning ("A container and its child are part of this SizeGroup");
241 queue_resize_on_widget (tmp_list->data, FALSE);
243 tmp_list = tmp_list->next;
246 g_slist_free (widgets);
247 g_slist_free (groups);
252 add_widget_to_closure (parent, GTK_SIZE_GROUP_VERTICAL, &groups, &widgets);
253 g_slist_foreach (widgets, (GFunc)mark_unvisited, NULL);
254 g_slist_foreach (groups, (GFunc)mark_unvisited, NULL);
256 reset_group_sizes (groups);
261 if (tmp_list->data == parent)
263 if (widget == parent)
264 real_queue_resize (parent);
266 else if (tmp_list->data == widget)
268 g_warning ("A container and its child are part of this SizeGroup");
271 queue_resize_on_widget (tmp_list->data, FALSE);
273 tmp_list = tmp_list->next;
276 g_slist_free (widgets);
277 g_slist_free (groups);
279 parent = parent->parent;
284 queue_resize_on_group (GtkSizeGroup *size_group)
286 if (size_group->widgets)
287 queue_resize_on_widget (size_group->widgets->data, TRUE);
291 initialize_size_group_quarks (void)
293 if (!size_groups_quark)
295 size_groups_quark = g_quark_from_static_string (size_groups_tag);
296 visited_quark = g_quark_from_static_string (visited_tag);
301 gtk_size_group_class_init (GtkSizeGroupClass *klass)
303 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
305 gobject_class->set_property = gtk_size_group_set_property;
306 gobject_class->get_property = gtk_size_group_get_property;
308 g_object_class_install_property (gobject_class,
310 g_param_spec_enum ("mode",
312 P_("The directions in which the size group affects the requested sizes"
313 " of its component widgets"),
314 GTK_TYPE_SIZE_GROUP_MODE,
315 GTK_SIZE_GROUP_HORIZONTAL, GTK_PARAM_READWRITE));
318 * GtkSizeGroup:ignore-hidden:
320 * If %TRUE, unmapped widgets are ignored when determining
321 * the size of the group.
325 g_object_class_install_property (gobject_class,
327 g_param_spec_boolean ("ignore-hidden",
329 P_("If TRUE, unmapped widgets are ignored "
330 "when determining the size of the group"),
332 GTK_PARAM_READWRITE));
334 initialize_size_group_quarks ();
335 g_type_class_add_private (klass, sizeof (GtkSizeGroupPrivate));
339 gtk_size_group_init (GtkSizeGroup *size_group)
341 size_group->widgets = NULL;
342 size_group->mode = GTK_SIZE_GROUP_HORIZONTAL;
343 size_group->have_width = 0;
344 size_group->have_height = 0;
345 size_group->ignore_hidden = 0;
349 gtk_size_group_buildable_init (GtkBuildableIface *iface)
351 iface->custom_tag_start = gtk_size_group_buildable_custom_tag_start;
352 iface->custom_finished = gtk_size_group_buildable_custom_finished;
355 G_DEFINE_TYPE_WITH_CODE (GtkSizeGroup, gtk_size_group, G_TYPE_OBJECT,
356 G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
357 gtk_size_group_buildable_init))
360 gtk_size_group_set_property (GObject *object,
365 GtkSizeGroup *size_group = GTK_SIZE_GROUP (object);
370 gtk_size_group_set_mode (size_group, g_value_get_enum (value));
372 case PROP_IGNORE_HIDDEN:
373 gtk_size_group_set_ignore_hidden (size_group, g_value_get_boolean (value));
376 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
382 gtk_size_group_get_property (GObject *object,
387 GtkSizeGroup *size_group = GTK_SIZE_GROUP (object);
392 g_value_set_enum (value, size_group->mode);
394 case PROP_IGNORE_HIDDEN:
395 g_value_set_boolean (value, size_group->ignore_hidden);
398 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
404 * gtk_size_group_new:
405 * @mode: the mode for the new size group.
407 * Create a new #GtkSizeGroup.
409 * Return value: a newly created #GtkSizeGroup
412 gtk_size_group_new (GtkSizeGroupMode mode)
414 GtkSizeGroup *size_group = g_object_new (GTK_TYPE_SIZE_GROUP, NULL);
416 size_group->mode = mode;
422 * gtk_size_group_set_mode:
423 * @size_group: a #GtkSizeGroup
424 * @mode: the mode to set for the size group.
426 * Sets the #GtkSizeGroupMode of the size group. The mode of the size
427 * group determines whether the widgets in the size group should
428 * all have the same horizontal requisition (%GTK_SIZE_GROUP_MODE_HORIZONTAL)
429 * all have the same vertical requisition (%GTK_SIZE_GROUP_MODE_VERTICAL),
430 * or should all have the same requisition in both directions
431 * (%GTK_SIZE_GROUP_MODE_BOTH).
434 gtk_size_group_set_mode (GtkSizeGroup *size_group,
435 GtkSizeGroupMode mode)
437 g_return_if_fail (GTK_IS_SIZE_GROUP (size_group));
439 if (size_group->mode != mode)
441 if (size_group->mode != GTK_SIZE_GROUP_NONE)
442 queue_resize_on_group (size_group);
443 size_group->mode = mode;
444 if (size_group->mode != GTK_SIZE_GROUP_NONE)
445 queue_resize_on_group (size_group);
447 g_object_notify (G_OBJECT (size_group), "mode");
452 * gtk_size_group_get_mode:
453 * @size_group: a #GtkSizeGroup
455 * Gets the current mode of the size group. See gtk_size_group_set_mode().
457 * Return value: the current mode of the size group.
460 gtk_size_group_get_mode (GtkSizeGroup *size_group)
462 g_return_val_if_fail (GTK_IS_SIZE_GROUP (size_group), GTK_SIZE_GROUP_BOTH);
464 return size_group->mode;
468 * gtk_size_group_set_ignore_hidden:
469 * @size_group: a #GtkSizeGroup
470 * @ignore_hidden: whether unmapped widgets should be ignored
471 * when calculating the size
473 * Sets whether unmapped widgets should be ignored when
474 * calculating the size.
479 gtk_size_group_set_ignore_hidden (GtkSizeGroup *size_group,
480 gboolean ignore_hidden)
482 g_return_if_fail (GTK_IS_SIZE_GROUP (size_group));
484 ignore_hidden = ignore_hidden != FALSE;
486 if (size_group->ignore_hidden != ignore_hidden)
488 size_group->ignore_hidden = ignore_hidden;
490 g_object_notify (G_OBJECT (size_group), "ignore-hidden");
495 * gtk_size_group_get_ignore_hidden:
496 * @size_group: a #GtkSizeGroup
498 * Returns if invisible widgets are ignored when calculating the size.
500 * Returns: %TRUE if invisible widgets are ignored.
505 gtk_size_group_get_ignore_hidden (GtkSizeGroup *size_group)
507 g_return_val_if_fail (GTK_IS_SIZE_GROUP (size_group), FALSE);
509 return size_group->ignore_hidden;
513 gtk_size_group_widget_destroyed (GtkWidget *widget,
514 GtkSizeGroup *size_group)
516 gtk_size_group_remove_widget (size_group, widget);
520 * gtk_size_group_add_widget:
521 * @size_group: a #GtkSizeGroup
522 * @widget: the #GtkWidget to add
524 * Adds a widget to a #GtkSizeGroup. In the future, the requisition
525 * of the widget will be determined as the maximum of its requisition
526 * and the requisition of the other widgets in the size group.
527 * Whether this applies horizontally, vertically, or in both directions
528 * depends on the mode of the size group. See gtk_size_group_set_mode().
530 * When the widget is destroyed or no longer referenced elsewhere, it will
531 * be removed from the size group.
534 gtk_size_group_add_widget (GtkSizeGroup *size_group,
539 g_return_if_fail (GTK_IS_SIZE_GROUP (size_group));
540 g_return_if_fail (GTK_IS_WIDGET (widget));
542 groups = get_size_groups (widget);
544 if (!g_slist_find (groups, size_group))
546 groups = g_slist_prepend (groups, size_group);
547 set_size_groups (widget, groups);
549 size_group->widgets = g_slist_prepend (size_group->widgets, widget);
551 g_signal_connect (widget, "destroy",
552 G_CALLBACK (gtk_size_group_widget_destroyed),
555 g_object_ref (size_group);
558 queue_resize_on_group (size_group);
562 * gtk_size_group_remove_widget:
563 * @size_group: a #GtkSizeGrup
564 * @widget: the #GtkWidget to remove
566 * Removes a widget from a #GtkSizeGroup.
569 gtk_size_group_remove_widget (GtkSizeGroup *size_group,
574 g_return_if_fail (GTK_IS_SIZE_GROUP (size_group));
575 g_return_if_fail (GTK_IS_WIDGET (widget));
576 g_return_if_fail (g_slist_find (size_group->widgets, widget));
578 g_signal_handlers_disconnect_by_func (widget,
579 gtk_size_group_widget_destroyed,
582 groups = get_size_groups (widget);
583 groups = g_slist_remove (groups, size_group);
584 set_size_groups (widget, groups);
586 size_group->widgets = g_slist_remove (size_group->widgets, widget);
587 queue_resize_on_group (size_group);
588 gtk_widget_queue_resize (widget);
590 g_object_unref (size_group);
594 * gtk_size_group_get_widgets:
595 * @size_group: a #GtkSizeGrup
597 * Returns the list of widgets associated with @size_group.
599 * Return value: (element-type GtkWidget) (transfer none): a #GSList of
600 * widgets. The list is owned by GTK+ and should not be modified.
605 gtk_size_group_get_widgets (GtkSizeGroup *size_group)
607 return size_group->widgets;
611 get_base_dimensions (GtkWidget *widget,
612 GtkSizeGroupMode mode,
616 GtkWidgetAuxInfo *aux_info = _gtk_widget_get_aux_info (widget, FALSE);
618 if (mode == GTK_SIZE_GROUP_HORIZONTAL)
622 if (aux_info && aux_info->width > 0)
623 *minimum_size = aux_info->width;
625 *minimum_size = widget->requisition.width;
631 *natural_size = aux_info->natural_size.width;
633 *natural_size = widget->requisition.width;
640 if (aux_info && aux_info->height > 0)
641 *minimum_size = aux_info->height;
643 *minimum_size = widget->requisition.height;
649 *natural_size = aux_info->natural_size.height;
651 *natural_size = widget->requisition.height;
657 do_size_request (GtkWidget *widget)
659 if (GTK_WIDGET_REQUEST_NEEDED (widget))
661 GtkWidgetAuxInfo *aux_info = _gtk_widget_get_aux_info (widget, TRUE);
663 gtk_widget_ensure_style (widget);
664 GTK_PRIVATE_UNSET_FLAG (widget, GTK_REQUEST_NEEDED);
666 gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (widget),
667 &widget->requisition,
668 &aux_info->natural_size);
670 g_assert (widget->requisition.width <= aux_info->natural_size.width);
671 g_assert (widget->requisition.height <= aux_info->natural_size.height);
676 compute_base_dimensions (GtkWidget *widget,
677 GtkSizeGroupMode mode,
681 do_size_request (widget);
682 get_base_dimensions (widget, mode, minimum_size, natural_size);
686 compute_dimension (GtkWidget *widget,
687 GtkSizeGroupMode mode,
691 GSList *widgets = NULL;
692 GSList *groups = NULL;
696 add_widget_to_closure (widget, mode, &groups, &widgets);
698 g_slist_foreach (widgets, (GFunc)mark_unvisited, NULL);
699 g_slist_foreach (groups, (GFunc)mark_unvisited, NULL);
701 g_slist_foreach (widgets, (GFunc)g_object_ref, NULL);
705 compute_base_dimensions (widget, mode, minimum_size, natural_size);
709 GtkSizeGroup *group = groups->data;
710 GtkSizeGroupPrivate *priv = GTK_SIZE_GROUP_GET_PRIVATE (group);
712 gint result_minimum_size = 0;
713 gint result_natural_size = 0;
715 if (mode == GTK_SIZE_GROUP_HORIZONTAL && group->have_width)
717 result_minimum_size = group->requisition.width;
718 result_natural_size = priv->natural_size.width;
720 else if (mode == GTK_SIZE_GROUP_VERTICAL && group->have_height)
722 result_minimum_size = group->requisition.height;
723 result_natural_size = priv->natural_size.height;
730 GtkWidget *tmp_widget = tmp_list->data;
732 gint tmp_widget_minimum_size;
733 gint tmp_widget_natural_size;
735 compute_base_dimensions (tmp_widget, mode,
736 &tmp_widget_minimum_size,
737 &tmp_widget_natural_size);
739 if (GTK_WIDGET_MAPPED (tmp_widget) || !group->ignore_hidden)
741 if (result_minimum_size < tmp_widget_minimum_size)
742 result_minimum_size = tmp_widget_minimum_size;
743 if (result_natural_size < tmp_widget_natural_size)
744 result_natural_size = tmp_widget_natural_size;
747 tmp_list = tmp_list->next;
753 GtkSizeGroup *tmp_group = tmp_list->data;
754 GtkSizeGroupPrivate *tmp_priv = GTK_SIZE_GROUP_GET_PRIVATE (tmp_group);
756 if (mode == GTK_SIZE_GROUP_HORIZONTAL)
758 tmp_group->have_width = TRUE;
759 tmp_group->requisition.width = result_minimum_size;
760 tmp_priv->natural_size.width = result_natural_size;
764 tmp_group->have_height = TRUE;
765 tmp_group->requisition.height = result_minimum_size;
766 tmp_priv->natural_size.height = result_natural_size;
769 tmp_list = tmp_list->next;
774 *minimum_size = result_minimum_size;
776 *natural_size = result_natural_size;
779 g_slist_foreach (widgets, (GFunc)g_object_unref, NULL);
781 g_slist_free (widgets);
782 g_slist_free (groups);
786 get_dimensions (GtkWidget *widget,
787 GtkSizeGroupMode mode,
791 GSList *widgets = NULL;
792 GSList *groups = NULL;
794 add_widget_to_closure (widget, mode, &groups, &widgets);
796 g_slist_foreach (widgets, (GFunc)mark_unvisited, NULL);
797 g_slist_foreach (groups, (GFunc)mark_unvisited, NULL);
801 get_base_dimensions (widget, mode, minimum_size, natural_size);
805 GtkSizeGroup *group = groups->data;
806 GtkSizeGroupPrivate *priv = GTK_SIZE_GROUP_GET_PRIVATE (group);
808 if (mode == GTK_SIZE_GROUP_HORIZONTAL && group->have_width)
811 *minimum_size = group->requisition.width;
813 *natural_size = priv->natural_size.width;
815 else if (mode == GTK_SIZE_GROUP_VERTICAL && group->have_height)
818 *minimum_size = group->requisition.height;
820 *natural_size = priv->natural_size.height;
824 g_slist_free (widgets);
825 g_slist_free (groups);
829 get_fast_child_requisition (GtkWidget *widget,
830 GtkRequisition *requisition)
832 GtkWidgetAuxInfo *aux_info = _gtk_widget_get_aux_info (widget, FALSE);
834 *requisition = widget->requisition;
838 if (aux_info->width > 0)
839 requisition->width = aux_info->width;
840 if (aux_info->height > 0)
841 requisition->height = aux_info->height;
846 get_fast_natural_size (GtkWidget *widget,
847 GtkRequisition *requisition)
849 GtkWidgetAuxInfo *aux_info = _gtk_widget_get_aux_info (widget, FALSE);
852 *requisition = aux_info->natural_size;
854 *requisition = widget->requisition;
858 * _gtk_size_group_get_child_requisition:
859 * @widget: a #GtkWidget
860 * @requisition: location to store computed requisition.
862 * Retrieve the "child requisition" of the widget, taking account grouping
863 * of the widget's requisition with other widgets.
866 _gtk_size_group_get_child_requisition (GtkWidget *widget,
867 GtkRequisition *requisition)
869 initialize_size_group_quarks ();
873 if (get_size_groups (widget))
875 get_dimensions (widget, GTK_SIZE_GROUP_HORIZONTAL, &requisition->width, NULL);
876 get_dimensions (widget, GTK_SIZE_GROUP_VERTICAL, &requisition->height, NULL);
878 /* Only do the full computation if we actually have size groups */
881 get_fast_child_requisition (widget, requisition);
886 * _gtk_size_group_compute_desired_size:
887 * @widget: a #GtkWidget
888 * @minimum_size: location to store computed minimum size
889 * @natural_size: location to store computed natural size
891 * Compute the desired size of a widget taking into account grouping of
892 * the widget's requisition with other widgets.
895 _gtk_size_group_compute_desired_size (GtkWidget *widget,
896 GtkRequisition *minimum_size,
897 GtkRequisition *natural_size)
899 initialize_size_group_quarks ();
901 if (get_size_groups (widget))
903 /* Only do the full computation if we actually have size groups */
905 compute_dimension (widget, GTK_SIZE_GROUP_HORIZONTAL,
906 minimum_size ? &minimum_size->width : NULL,
907 natural_size ? &natural_size->width : NULL);
908 compute_dimension (widget, GTK_SIZE_GROUP_VERTICAL,
909 minimum_size ? &minimum_size->height : NULL,
910 natural_size ? &natural_size->height : NULL);
914 do_size_request (widget);
917 get_fast_child_requisition (widget, minimum_size);
919 get_fast_natural_size (widget, natural_size);
924 * _gtk_size_group_queue_resize:
925 * @widget: a #GtkWidget
927 * Queue a resize on a widget, and on all other widgets grouped with this widget.
930 _gtk_size_group_queue_resize (GtkWidget *widget)
932 initialize_size_group_quarks ();
934 queue_resize_on_widget (widget, TRUE);
940 } GSListSubParserData;
943 size_group_start_element (GMarkupParseContext *context,
944 const gchar *element_name,
946 const gchar **values,
951 GSListSubParserData *data = (GSListSubParserData*)user_data;
953 if (strcmp (element_name, "widget") == 0)
954 for (i = 0; names[i]; i++)
955 if (strcmp (names[i], "name") == 0)
956 data->items = g_slist_prepend (data->items, g_strdup (values[i]));
957 else if (strcmp (element_name, "widgets") == 0)
960 g_warning ("Unsupported type tag for GtkSizeGroup: %s\n",
965 static const GMarkupParser size_group_parser =
967 size_group_start_element
971 gtk_size_group_buildable_custom_tag_start (GtkBuildable *buildable,
974 const gchar *tagname,
975 GMarkupParser *parser,
978 GSListSubParserData *parser_data;
983 if (strcmp (tagname, "widgets") == 0)
985 parser_data = g_slice_new0 (GSListSubParserData);
986 parser_data->items = NULL;
987 parser_data->object = G_OBJECT (buildable);
989 *parser = size_group_parser;
998 gtk_size_group_buildable_custom_finished (GtkBuildable *buildable,
1001 const gchar *tagname,
1005 GSListSubParserData *data;
1008 if (strcmp (tagname, "widgets"))
1011 data = (GSListSubParserData*)user_data;
1012 data->items = g_slist_reverse (data->items);
1014 for (l = data->items; l; l = l->next)
1016 object = gtk_builder_get_object (builder, l->data);
1019 g_warning ("Unknown object %s specified in sizegroup %s",
1020 (const gchar*)l->data,
1021 gtk_buildable_get_name (GTK_BUILDABLE (data->object)));
1024 gtk_size_group_add_widget (GTK_SIZE_GROUP (data->object),
1025 GTK_WIDGET (object));
1028 g_slist_free (data->items);
1029 g_slice_free (GSListSubParserData, data);
1033 #define __GTK_SIZE_GROUP_C__
1034 #include "gtkaliasdef.c"