Allow hyperlinks to implement AccessibleAction; this convention is
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Mon, 30 Jun 2003 21:26:40 +0000 (21:26 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Mon, 30 Jun 2003 21:26:40 +0000 (21:26 +0000)
used by gtkhtml2.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@457 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
libspi/action.c
libspi/hyperlink.c

index 8375f51..4d1d343 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,16 @@
 2003-06-30  Bill Haneman <bill.haneman@sun.com>
+       
+       * 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 <bill.haneman@sun.com>
 
        * configure.in: Revved to 1.3.5.
        
index d7865f3..a60af42 100644 (file)
@@ -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);
 }
 
index e123a84..ef41984 100644 (file)
@@ -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)
 {