mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
Make sure that the quarks are initialized before using them. (#353736)
2006-10-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtksizegroup.c: Make sure that the quarks are initialized before using them. (#353736)
This commit is contained in:
parent
c3e1be4d9b
commit
47a78aaf8b
@ -1,5 +1,8 @@
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtksizegroup.c: Make sure that the quarks are
|
||||
initialized before using them. (#353736)
|
||||
|
||||
* gtk/Makefile.am (stamp-icons): Use rm instead of ln -f to
|
||||
replace existing links. (#354849, James Evans)
|
||||
|
||||
|
@ -253,6 +253,16 @@ queue_resize_on_group (GtkSizeGroup *size_group)
|
||||
queue_resize_on_widget (size_group->widgets->data, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_size_group_quarks (void)
|
||||
{
|
||||
if (!size_groups_quark)
|
||||
{
|
||||
size_groups_quark = g_quark_from_static_string (size_groups_tag);
|
||||
visited_quark = g_quark_from_string (visited_tag);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_size_group_class_init (GtkSizeGroupClass *klass)
|
||||
{
|
||||
@ -287,8 +297,7 @@ gtk_size_group_class_init (GtkSizeGroupClass *klass)
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
size_groups_quark = g_quark_from_static_string (size_groups_tag);
|
||||
visited_quark = g_quark_from_string (visited_tag);
|
||||
initialize_size_group_quarks ();
|
||||
}
|
||||
|
||||
static void
|
||||
@ -732,6 +741,8 @@ void
|
||||
_gtk_size_group_get_child_requisition (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
initialize_size_group_quarks ();
|
||||
|
||||
if (requisition)
|
||||
{
|
||||
if (get_size_groups (widget))
|
||||
@ -761,6 +772,8 @@ _gtk_size_group_compute_requisition (GtkWidget *widget,
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
initialize_size_group_quarks ();
|
||||
|
||||
if (get_size_groups (widget))
|
||||
{
|
||||
/* Only do the full computation if we actually have size groups */
|
||||
@ -792,6 +805,8 @@ _gtk_size_group_compute_requisition (GtkWidget *widget,
|
||||
void
|
||||
_gtk_size_group_queue_resize (GtkWidget *widget)
|
||||
{
|
||||
initialize_size_group_quarks ();
|
||||
|
||||
queue_resize_on_widget (widget, TRUE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user