From 7ae16764e71eefc689fad543bdb57c511d3ed05c Mon Sep 17 00:00:00 2001 From: billh Date: Mon, 30 Jun 2003 21:26:40 +0000 Subject: [PATCH] Allow hyperlinks to implement AccessibleAction; this convention is used by gtkhtml2. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@457 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 12 ++++++++++++ libspi/action.c | 3 ++- libspi/hyperlink.c | 10 +++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8375f51..4d1d343 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,16 @@ 2003-06-30 Bill Haneman + + * libspi/action.c: + (get_action_from_servant): + Removed assertion that action is implemented on an AtkObject. + + * libspi/hyperlink.c: + (spi_hyperlink_new): + Aggregate AccessibleAction interface on the hyperlink object if + the object implements AtkAction. (This convention is used in + gtkhtml2.) + +2003-06-30 Bill Haneman * configure.in: Revved to 1.3.5. diff --git a/libspi/action.c b/libspi/action.c index d7865f3..a60af42 100644 --- a/libspi/action.c +++ b/libspi/action.c @@ -94,7 +94,8 @@ get_action_from_servant (PortableServer_Servant servant) { SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant)); g_return_val_if_fail (object != NULL, NULL); - g_return_val_if_fail (ATK_IS_OBJECT(object->gobj), NULL); + /* the convention of making hyperlinks actionable breaks the assertion below */ + /* g_return_val_if_fail (ATK_IS_OBJECT(object->gobj), NULL); */ return ATK_ACTION (object->gobj); } diff --git a/libspi/hyperlink.c b/libspi/hyperlink.c index e123a84..ef41984 100644 --- a/libspi/hyperlink.c +++ b/libspi/hyperlink.c @@ -91,10 +91,18 @@ spi_hyperlink_new (AtkHyperlink *object) spi_base_construct (SPI_BASE (new_hyperlink), G_OBJECT(object)); + /* + * some hyperlinks are actionable... this is an ATK convention + * that seems convenient though possibly poorly documented or unintended. + */ + if (ATK_IS_ACTION (object)) + { + bonobo_object_add_interface (bonobo_object (new_hyperlink), + BONOBO_OBJECT (spi_action_interface_new (object))); + } return new_hyperlink; } - static AtkHyperlink * get_hyperlink_from_servant (PortableServer_Servant servant) { -- 2.7.4