[g-a-devel]URGENT: RFC IDL bug in at-spi
- From: Bill Haneman <bill haneman sun com>
- To: gnome-accessibility-devel gnome org, gnome2-release-team gnome org
- Subject: [g-a-devel]URGENT: RFC IDL bug in at-spi
- Date: Thu, 11 Apr 2002 17:51:49 +0100
Hi Folks:
Marc has found the root cause of a serious at-spi bug, it turns out
to be an API bug. Accessibility_StateSet turns out not to
inherit from Bonobo_Unknown as it should.
Marc has prepared and tested a patch to fix this,
may we commit for RC1 ? Without this patch the StateSet
stuff is quite useless; therefore we are confident that
this change will not impact any API users negatively;
in fact it fixes the currently broken code which
uses this API.
Sorry for the 11th hour request, but better now than
never...
-Bill
Index: at-spi/idl/Accessibility_State.idl
===================================================================
RCS file: /cvs/gnome/at-spi/idl/Accessibility_State.idl,v
retrieving revision 1.7
diff -u -r1.7 Accessibility_State.idl
--- at-spi/idl/Accessibility_State.idl 26 Feb 2002 18:30:54 -0000 1.7
+++ at-spi/idl/Accessibility_State.idl 11 Apr 2002 11:25:25 -0000
@@ -113,7 +113,7 @@
typedef sequence <StateType> StateSeq;
- interface StateSet {
+ interface StateSet : Bonobo::Unknown {
boolean contains (in StateType state);
void add (in StateType state);
void remove (in StateType state);
Index: at-spi/libspi/accessible.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/accessible.c,v
retrieving revision 1.42
diff -u -r1.42 accessible.c
--- at-spi/libspi/accessible.c 15 Mar 2002 15:26:28 -0000 1.42
+++ at-spi/libspi/accessible.c 11 Apr 2002 11:25:25 -0000
@@ -306,13 +306,20 @@
CORBA_Environment *ev)
{
AtkObject *object = get_atkobject_from_servant (servant);
+ AtkStateSet *atk_set;
+ SpiStateSet *set;
+ Accessibility_StateSet retval;
bonobo_return_val_if_fail (object != NULL, NULL, ev);
- printf ("SpiAccessible get_state.\n");
+ atk_set = atk_object_ref_state_set (object);
+
+ set = spi_state_set_new (atk_set);
+ retval = bonobo_object_dup_ref (
+ BONOBO_OBJREF(set),
+ ev);
- /* TODO: implement the bonobo stateset class */
- return (Accessibility_StateSet) NULL;
+ return retval;
}
/*
Index: at-spi/libspi/libspi.h
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/libspi.h,v
retrieving revision 1.4
diff -u -r1.4 libspi.h
--- at-spi/libspi/libspi.h 3 Jan 2002 20:23:00 -0000 1.4
+++ at-spi/libspi/libspi.h 11 Apr 2002 11:25:25 -0000
@@ -32,6 +32,7 @@
#include <libspi/image.h>
#include <libspi/relation.h>
#include <libspi/selection.h>
+#include <libspi/stateset.h>
#include <libspi/table.h>
#include <libspi/text.h>
#include <libspi/value.h>
Index: at-spi/libspi/stateset.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/stateset.c,v
retrieving revision 1.2
diff -u -r1.2 stateset.c
--- at-spi/libspi/stateset.c 14 Mar 2002 20:39:41 -0000 1.2
+++ at-spi/libspi/stateset.c 11 Apr 2002 11:25:25 -0000
@@ -36,6 +36,12 @@
{
gint i;
+ if (accessible_state_types || atk_state_types)
+ return FALSE;
+ if (!accessible_state_types)
+ accessible_state_types = g_new (Accessibility_StateType, Accessibility_STATE_LAST_DEFINED);
+ if (!atk_state_types)
+ atk_state_types = g_new (AtkStateType, ATK_STATE_LAST_DEFINED);
g_return_val_if_fail (accessible_state_types, FALSE);
g_return_val_if_fail (atk_state_types, FALSE);
@@ -347,6 +353,7 @@
{
POA_Accessibility_StateSet__epv *epv = &klass->epv;
+ spi_init_state_type_tables ();
epv->contains = impl_contains;
epv->add = impl_add;
epv->remove = impl_remove;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]