2003-02-14 Padraig O'Briain <padraig.obriain@sun.com>
[platform/upstream/at-spi2-core.git] / cspi / spi_event.c
index 577f8e6..27ac522 100644 (file)
@@ -2,8 +2,8 @@
  * AT-SPI - Assistive Technology Service Provider Interface
  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
  *
- * Copyright 2001, 2002 Sun Microsystems Inc.,
- * Copyright 2001, 2002 Ximian, Inc.
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.,
+ * Copyright 2001, 2002, 2003 Ximian, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -338,7 +338,7 @@ cspi_internal_event_get_text (const InternalEvent *e)
   any = (CORBA_any *) e->data;
   if (CORBA_TypeCode_equivalent (any->_type, TC_CORBA_string, NULL)) 
     {
-      return * (char **) any->_value;
+      return g_strdup (* (char **) any->_value);
     } 
   else
     {
@@ -354,11 +354,12 @@ static Accessible *
 cspi_internal_event_get_object (const InternalEvent *e)
 {
   CORBA_any *any;
-  Accessible *accessible;
+
   g_return_val_if_fail (e, NULL);
   g_return_val_if_fail (e->data, NULL);
+
   any = (CORBA_any *) e->data;
-  if (any->_type == TC_CORBA_Object) 
+  if (CORBA_TypeCode_equal (any->_type, TC_CORBA_Object, cspi_ev()))
     return cspi_object_take (* (CORBA_Object *) any->_value);
   else 
     return NULL;
@@ -366,7 +367,7 @@ cspi_internal_event_get_object (const InternalEvent *e)
 
 /**
  * AccessibleTextChangedEvent_getChangeString:
- * @event: a pointer to the #AccessibleEvent being queried.
+ * @e: a pointer to the #AccessibleEvent being queried.
  *
  * Queries an #AccessibleEvent of type "object:text-changed", 
  *         returning the text inserted or deleted.
@@ -535,7 +536,7 @@ cspi_internal_event_check (const AccessibleEvent *e)
 static InternalEvent *
 cspi_internal_event_add (const InternalEvent *e)
 {
-  _cspi_event_queue = g_slist_prepend (_cspi_event_queue, e);
+  _cspi_event_queue = g_slist_prepend (_cspi_event_queue, (gpointer) e);
   return (InternalEvent *) e;
 }