Upgraded a few autoconf macro usage lines in configure.in and Makefile.am's.
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Sun, 9 Dec 2001 23:08:14 +0000 (23:08 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Sun, 9 Dec 2001 23:08:14 +0000 (23:08 +0000)
Added some tests for Value interface.  Partial fix for failure to relay
some events to global listeners.  Fixed inheritance error in SpiValue.

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

ChangeLog
at-bridge/bridge.c
atk-bridge/bridge.c
configure.in
libspi/accessible.c
libspi/application.c
libspi/value.c
registryd/Makefile.am

index 53126ce..fc7a5f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2001-12-09  Bill Haneman <bill.haneman@sun.com>
+
+       * configure.in:
+       Replace use of AM_PROG_XML_I18N_TOOLS macro with AC_PROG_INTLTOOL.
+       remove 'dnl' comment line from AC_OUTPUT (autoconf doesn't like
+       it).
+
+       * at-bridge/bridge.c:
+       Beefed up a couple of debug printouts.
+       One-line fix for signal notification name formatting.
+
+       * libspi/accessible.c:
+       Added assertion to spi_accessible_new ().
+
+       * libspi/application.c:
+       Put #ifdef qualifiers around a printf.
+
+       * libspi/value.c:
+       Fixed derivation (from BONOBO_OBJECT to SPI_BASE).
+
+       * registryd/Makefile.am:
+       * util/Makefile.am:
+       Replaces use of XML_I18N_MERGE_SERVER_RULE with
+       INTLTOOL_SERVER_RULE macro.
+
+       * test/simple-at.c:
+       Added an event listener for several ATK signals, for
+       testing and debugging.  Removed a few g_warnings.
+       Added test output if focussed item implements the Value interface.
+
+       * test/test-simple.c:
+       Added test_value () function (known not to pass at the moment, so
+       not actually called yet.
+       
 2001-12-08  Michael Meeks  <michael@ximian.com>
 
        * at-bridge/bridge.c (bridge_focus_tracker),
index e4e8f7e..ed9bd7e 100644 (file)
@@ -216,7 +216,10 @@ emit_eventv (GObject      *gobject,
   Accessibility_Event e;
   SpiAccessible      *source;
   AtkObject          *aobject;
-
+#ifdef SPI_BRIDGE_DEBUG
+  CORBA_string s;
+#endif
+  
   va_start (args, format);
   
   if (ATK_IS_IMPLEMENTOR (gobject))
@@ -245,8 +248,10 @@ emit_eventv (GObject      *gobject,
       e.detail2 = detail2;
 
 #ifdef SPI_BRIDGE_DEBUG
-      g_warning ("Emitting event '%s' (%d, %d) on %p",
-                e.type, e.detail1, e.detail2, source);
+      s = Accessibility_Accessible__get_name (BONOBO_OBJREF (source), &ev);
+      g_warning ("Emitting event '%s' (%lu, %lu) on %s",
+                e.type, e.detail1, e.detail2, s);
+      CORBA_free (s);
 #endif
 
       Accessibility_Registry_notifyEvent (registry, &e, &ev);
@@ -271,12 +276,14 @@ bridge_property_event_listener (GSignalInvocationHint *signal_hint,
 #ifdef SPI_BRIDGE_DEBUG
   GSignalQuery signal_query;
   const gchar *name;
+  gchar *s;
   
   g_signal_query (signal_hint->signal_id, &signal_query);
   name = signal_query.signal_name;
 
-  fprintf (stderr, "Received (property) signal %s:%s\n",
-          g_type_name (signal_query.itype), name);
+  s = atk_object_get_name (ATK_OBJECT (g_value_get_object (param_values + 0)));
+  fprintf (stderr, "Received (property) signal %s:%s from object %s\n",
+          g_type_name (signal_query.itype), name, s);
 #endif
 
   gobject = g_value_get_object (param_values + 0);
@@ -400,7 +407,7 @@ bridge_signal_listener (GSignalInvocationHint *signal_hint,
 
   gobject = g_value_get_object (param_values + 0);
 
-  emit_eventv (gobject, 0, 0, "%s:%s", name, g_type_name (signal_query.itype));
+  emit_eventv (gobject, 0, 0, "object:%s", name);
 
   return TRUE;
 }
index e4e8f7e..ed9bd7e 100644 (file)
@@ -216,7 +216,10 @@ emit_eventv (GObject      *gobject,
   Accessibility_Event e;
   SpiAccessible      *source;
   AtkObject          *aobject;
-
+#ifdef SPI_BRIDGE_DEBUG
+  CORBA_string s;
+#endif
+  
   va_start (args, format);
   
   if (ATK_IS_IMPLEMENTOR (gobject))
@@ -245,8 +248,10 @@ emit_eventv (GObject      *gobject,
       e.detail2 = detail2;
 
 #ifdef SPI_BRIDGE_DEBUG
-      g_warning ("Emitting event '%s' (%d, %d) on %p",
-                e.type, e.detail1, e.detail2, source);
+      s = Accessibility_Accessible__get_name (BONOBO_OBJREF (source), &ev);
+      g_warning ("Emitting event '%s' (%lu, %lu) on %s",
+                e.type, e.detail1, e.detail2, s);
+      CORBA_free (s);
 #endif
 
       Accessibility_Registry_notifyEvent (registry, &e, &ev);
@@ -271,12 +276,14 @@ bridge_property_event_listener (GSignalInvocationHint *signal_hint,
 #ifdef SPI_BRIDGE_DEBUG
   GSignalQuery signal_query;
   const gchar *name;
+  gchar *s;
   
   g_signal_query (signal_hint->signal_id, &signal_query);
   name = signal_query.signal_name;
 
-  fprintf (stderr, "Received (property) signal %s:%s\n",
-          g_type_name (signal_query.itype), name);
+  s = atk_object_get_name (ATK_OBJECT (g_value_get_object (param_values + 0)));
+  fprintf (stderr, "Received (property) signal %s:%s from object %s\n",
+          g_type_name (signal_query.itype), name, s);
 #endif
 
   gobject = g_value_get_object (param_values + 0);
@@ -400,7 +407,7 @@ bridge_signal_listener (GSignalInvocationHint *signal_hint,
 
   gobject = g_value_get_object (param_values + 0);
 
-  emit_eventv (gobject, 0, 0, "%s:%s", name, g_type_name (signal_query.itype));
+  emit_eventv (gobject, 0, 0, "object:%s", name);
 
   return TRUE;
 }
index 65317a9..fcbc417 100644 (file)
@@ -31,7 +31,7 @@ AM_CONFIG_HEADER(config.h)
 dnl Initialize maintainer mode
 AM_MAINTAINER_MODE
 
-dnl AM_PROG_XML_I18N_TOOLS
+AC_PROG_INTLTOOL
 
 dnl Checks for programs
 AC_PROG_CC
@@ -146,7 +146,7 @@ AC_MSG_ERROR([You must have popt 1.5 or greater to compile the utilities.]))
 AC_OUTPUT([
 Makefile
 at-spi-1.0.pc
-dnl po/Makefile.in
+po/Makefile.in
 docs/Makefile
 docs/reference/Makefile
 docs/reference/idl/Makefile
index ff11bbd..1148cb0 100644 (file)
@@ -317,6 +317,8 @@ spi_accessible_new (AtkObject *o)
 
     CORBA_exception_init (&ev);
 
+    g_assert (o);
+
     if ((retval = g_hash_table_lookup (get_public_refs (), o)))
       {
         bonobo_object_ref (BONOBO_OBJECT (retval));
index 63f7f85..40e09c7 100644 (file)
@@ -212,8 +212,10 @@ spi_application_toolkit_event_listener (GSignalInvocationHint *signal_hint,
                                g_type_name (signal_query.itype), 
                                signal_query.signal_name);
 
+#ifdef SPI_DEBUG  
   fprintf (stderr, "Received signal %s\n", event_name);
-
+#endif
+  
   aobject = get_atk_object_ref (g_value_get_object (param_values + 0));
 
   source = spi_accessible_new (aobject);
index c099b2c..16e64fb 100644 (file)
@@ -25,6 +25,8 @@
 #include <stdio.h>
 #include <libspi/value.h>
 
+#define PARENT_TYPE SPI_TYPE_BASE
+
 /* Static function declarations */
 
 static void
@@ -48,7 +50,7 @@ impl__set_currentValue (PortableServer_Servant _servant,
 
 BONOBO_TYPE_FUNC_FULL (SpiValue,
                       Accessibility_Value,
-                      BONOBO_TYPE_OBJECT,
+                      PARENT_TYPE,
                       spi_value);
 
 
@@ -106,6 +108,12 @@ impl__get_minimumValue (PortableServer_Servant servant,
 
   g_return_val_if_fail (value != NULL, 0.0);
 
+  /*
+   * FIXME: ahem, there's no guarantee that
+   * atk_value_get_minimum_value returns a float.
+   * What we really need is a generic value API here
+   */
+
   g_value_init (&gvalue, G_TYPE_FLOAT);
   atk_value_get_minimum_value (value, &gvalue);
 
index 07e1aa6..403397e 100644 (file)
@@ -13,6 +13,6 @@ LDADD = ../libspi/libspi.la -lXtst $(REGISTRYD_LIBS)
 serverinfodir = $(libdir)/bonobo/servers
 serverinfo_DATA = Accessibility_Registry.server
 
-@XML_I18N_MERGE_SERVER_RULE@
+@INTLTOOL_SERVER_RULE@
 
 EXTRA_DIST = Accessibility_Registry.server.in $(serverinfo_DATA)