From bb15517d35b4ae3718afe7880cfa4a9dc09106d2 Mon Sep 17 00:00:00 2001 From: billh Date: Sun, 9 Dec 2001 23:08:14 +0000 Subject: [PATCH] Upgraded a few autoconf macro usage lines in configure.in and Makefile.am's. 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 | 34 ++++++++++++++++++++++++++++++++++ at-bridge/bridge.c | 19 +++++++++++++------ atk-bridge/bridge.c | 19 +++++++++++++------ configure.in | 4 ++-- libspi/accessible.c | 2 ++ libspi/application.c | 4 +++- libspi/value.c | 10 +++++++++- registryd/Makefile.am | 2 +- 8 files changed, 77 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53126ce..fc7a5f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +2001-12-09 Bill Haneman + + * 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 * at-bridge/bridge.c (bridge_focus_tracker), diff --git a/at-bridge/bridge.c b/at-bridge/bridge.c index e4e8f7e..ed9bd7e 100644 --- a/at-bridge/bridge.c +++ b/at-bridge/bridge.c @@ -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; } diff --git a/atk-bridge/bridge.c b/atk-bridge/bridge.c index e4e8f7e..ed9bd7e 100644 --- a/atk-bridge/bridge.c +++ b/atk-bridge/bridge.c @@ -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; } diff --git a/configure.in b/configure.in index 65317a9..fcbc417 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/libspi/accessible.c b/libspi/accessible.c index ff11bbd..1148cb0 100644 --- a/libspi/accessible.c +++ b/libspi/accessible.c @@ -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)); diff --git a/libspi/application.c b/libspi/application.c index 63f7f85..40e09c7 100644 --- a/libspi/application.c +++ b/libspi/application.c @@ -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); diff --git a/libspi/value.c b/libspi/value.c index c099b2c..16e64fb 100644 --- a/libspi/value.c +++ b/libspi/value.c @@ -25,6 +25,8 @@ #include #include +#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); diff --git a/registryd/Makefile.am b/registryd/Makefile.am index 07e1aa6..403397e 100644 --- a/registryd/Makefile.am +++ b/registryd/Makefile.am @@ -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) -- 2.7.4