diff options
author | Damon Chaplin <damon@gnome.org> | 2006-05-19 14:04:47 +0000 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2006-05-19 14:04:47 +0000 |
commit | 2d4235c28b71eb368c1ab8f3e3b15cbe93d997ff (patch) | |
tree | c386b8098f8b83f055cbc8620e3141f4c9c8c399 /gtk/gtkfontsel.c | |
parent | 74026576724defce11d34def23d855de9e699a4d (diff) | |
download | gtk+-2d4235c28b71eb368c1ab8f3e3b15cbe93d997ff.tar.gz |
use atk_relation_add_target() to add the targets, since it sets up weak
2006-05-19 Damon Chaplin <damon@gnome.org>
* gtk/gtkfontsel.c (gtk_font_selection_init): use
atk_relation_add_target() to add the targets, since it sets up weak
references to avoid crashes. (#305530)
Diffstat (limited to 'gtk/gtkfontsel.c')
-rw-r--r-- | gtk/gtkfontsel.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index ee88c292cb..1c2914793a 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -474,15 +474,13 @@ gtk_font_selection_init (GtkFontSelection *fontsel) AtkRelationSet *relation_set; AtkRelation *relation; AtkObject *obj_array[1]; - GPtrArray *array; atk_label = gtk_widget_get_accessible (label); relation_set = atk_object_ref_relation_set (atk_obj); relation = atk_relation_set_get_relation_by_type (relation_set, ATK_RELATION_LABELLED_BY); if (relation) { - array = atk_relation_get_target (relation); - g_ptr_array_add (array, atk_label); + atk_relation_add_target (relation, atk_label); } else { @@ -496,8 +494,7 @@ gtk_font_selection_init (GtkFontSelection *fontsel) relation = atk_relation_set_get_relation_by_type (relation_set, ATK_RELATION_LABEL_FOR); if (relation) { - array = atk_relation_get_target (relation); - g_ptr_array_add (array, atk_obj); + atk_relation_add_target (relation, atk_obj); } else { |