From cd96f06d1ec770abd8c11abeafd115e8bd8ebafc Mon Sep 17 00:00:00 2001 From: Padraig O'Briain Date: Wed, 26 Feb 2003 14:40:50 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 17 ++++++++++++++++- atk/atkgobjectaccessible.c | 7 ++++--- atk/atkobject.c | 11 ++++++++++- atk/atkvalue.c | 30 ++++++++++++++++++++++++++---- docs/tmpl/atkhypertext.sgml | 8 ++++++++ 5 files changed, 64 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index c847ef2..5120710 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2003-02-26 Padraig O'Briain + + * atk/atkgobjectaccessible.c (atk_gobject_accessible_from_object): + Correct creation of non-AtkGObjectAccessible (bug #107124) + + * atk/atkobject.c (atk_object_class_init): Set default initialize + function so that code which does not check for existence of parent + class's initialize function will work. + + * atk/atkvalue.c: (atk_value_get_minimum_value, + atk_value_get_maximum_value, atk_value_get_current_value): + Reset Value argument if it is a valid GValue otherwise zeroise it. + + docs/tmpl/atkhypertext.sgml: Add link-selected signal. + 2003-02-25 Tor Lillqvist * Makefile.am (EXTRA_DIST): Dist atk-zip.sh.in, not atk-zip.sh. @@ -166,7 +181,7 @@ Tue Jan 28 15:18:24 2003 Owen Taylor * docs/atk-sections.txt: Add new functions and data items. - * docs/tmpl/atk-object.sgml: Remove some docuementation and put in + * docs/tmpl/atk-object.sgml: Remove some documentation and put in atkobject.h. Add reference to accessible-table-caption-object. * docs/tmpl/atk-relation.sgml: Add new properties diff --git a/atk/atkgobjectaccessible.c b/atk/atkgobjectaccessible.c index 4267c50..a6c7270 100644 --- a/atk/atkgobjectaccessible.c +++ b/atk/atkgobjectaccessible.c @@ -1,5 +1,5 @@ /* ATK - Accessibility Toolkit - * Copyright 2001 Sun Microsystems Inc. + * Copyright 2001, 2002, 2003 Sun Microsystems Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -85,15 +85,16 @@ atk_gobject_accessible_for_object (GObject *obj) G_OBJECT_TYPE (obj)); accessible = atk_object_factory_create_accessible (factory, obj); - if (!quark_accessible_object) + if (!ATK_IS_GOBJECT_ACCESSIBLE (accessible)) { /* * The AtkObject which was created was not a AtkGObjectAccessible */ - quark_accessible_object = g_quark_from_static_string ("accessible-object"); g_object_weak_ref (obj, (GWeakNotify) g_object_unref, accessible); + if (!quark_accessible_object) + quark_accessible_object = g_quark_from_static_string ("accessible-object"); } g_object_set_qdata (obj, quark_accessible_object, accessible); } diff --git a/atk/atkobject.c b/atk/atkobject.c index 1cf28fe..c63c7ef 100755 --- a/atk/atkobject.c +++ b/atk/atkobject.c @@ -73,7 +73,8 @@ static void atk_object_init (AtkObject *accessible AtkObjectClass *klass); static AtkRelationSet* atk_object_real_ref_relation_set (AtkObject *accessible); - +static void atk_object_real_initialize (AtkObject *accessible, + gpointer data); static void atk_object_real_set_property (GObject *object, guint prop_id, const GValue *value, @@ -178,6 +179,7 @@ atk_object_class_init (AtkObjectClass *klass) klass->get_role = atk_object_real_get_role; klass->get_layer = atk_object_real_get_layer; klass->get_mdi_zorder = NULL; + klass->initialize = atk_object_real_initialize; klass->ref_state_set = atk_object_real_ref_state_set; klass->set_name = atk_object_real_set_name; klass->set_description = atk_object_real_set_description; @@ -1583,3 +1585,10 @@ atk_object_remove_relationship (AtkObject *object, return ret; } + +static void +atk_object_real_initialize (AtkObject *accessible, + gpointer data) +{ + return; +} diff --git a/atk/atkvalue.c b/atk/atkvalue.c index 6065346..22d1b6d 100755 --- a/atk/atkvalue.c +++ b/atk/atkvalue.c @@ -1,5 +1,5 @@ /* ATK - Accessibility Toolkit - * Copyright 2001 Sun Microsystems Inc. + * Copyright 2001, 2002, 2003 Sun Microsystems Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,6 +17,7 @@ * Boston, MA 02111-1307, USA. */ +#include #include "atkvalue.h" GType @@ -58,7 +59,14 @@ atk_value_get_current_value (AtkValue *obj, iface = ATK_VALUE_GET_IFACE (obj); if (iface->get_current_value) - (iface->get_current_value) (obj, value); + { + if (G_IS_VALUE (value)) + g_value_unset (value); + else + memset (value, 0, sizeof (*value)); + + (iface->get_current_value) (obj, value); + } } /** @@ -80,7 +88,14 @@ atk_value_get_maximum_value (AtkValue *obj, iface = ATK_VALUE_GET_IFACE (obj); if (iface->get_maximum_value) - (iface->get_maximum_value) (obj, value); + { + if (G_IS_VALUE (value)) + g_value_unset (value); + else + memset (value, 0, sizeof (*value)); + + (iface->get_maximum_value) (obj, value); + } } /** @@ -102,7 +117,14 @@ atk_value_get_minimum_value (AtkValue *obj, iface = ATK_VALUE_GET_IFACE (obj); if (iface->get_minimum_value) - (iface->get_minimum_value) (obj, value); + { + if (G_IS_VALUE (value)) + g_value_unset (value); + else + memset (value, 0, sizeof (*value)); + + (iface->get_minimum_value) (obj, value); + } } /** diff --git a/docs/tmpl/atkhypertext.sgml b/docs/tmpl/atkhypertext.sgml index 1e0c3e6..0f59ad5 100644 --- a/docs/tmpl/atkhypertext.sgml +++ b/docs/tmpl/atkhypertext.sgml @@ -49,3 +49,11 @@ The AtkHypertext structure does not contain any fields. @Returns: + + + + + +@atkhypertext: the object which received the signal. +@arg1: + -- 2.7.4