summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamon Chaplin <damon@gnome.org>2006-05-19 14:07:22 +0000
committerDamon Chaplin <damon@src.gnome.org>2006-05-19 14:07:22 +0000
commited03a29ba3ce6d72213b69a47419f01af3ffceb0 (patch)
treee4e4bca8c5e90ed9581e8285da2842038b04fc47
parent22863b3e5a697c86c65e8667f360cc53418455a2 (diff)
downloadgdk-pixbuf-ed03a29ba3ce6d72213b69a47419f01af3ffceb0.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)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--gtk/gtkfontsel.c7
3 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9359255c8..dcf12aa3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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)
+
2006-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (gtk_calendar_drag_motion): Don't produce
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 9359255c8..dcf12aa3b 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+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)
+
2006-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (gtk_calendar_drag_motion): Don't produce
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index 3aab58029..db0f66033 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -510,15 +510,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
{
@@ -532,8 +530,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
{