Bump version, remove dbus-glib dependency, and add pc file
authorMike Gorse <mgorse@novell.com>
Mon, 21 Mar 2011 18:44:46 +0000 (11:44 -0700)
committerMike Gorse <mgorse@novell.com>
Mon, 21 Mar 2011 18:52:35 +0000 (11:52 -0700)
Add in a modified version of dbus-gmain.c so that we can stop dependeing on
dbus-glib and include a currently unreviewed fix for FDO#35115.
Also add a pc file and bump version to 1.91.92.

12 files changed:
Makefile.am
atspi-2-uninstalled.pc.in [new file with mode: 0644]
atspi-2.pc.in [new file with mode: 0644]
atspi/Makefile.am
atspi/atspi-gmain.c [new file with mode: 0644]
atspi/atspi-gmain.h [new file with mode: 0644]
atspi/atspi-misc.c
atspi/atspi.h
configure.ac
dbind/dbind.c
registryd/Makefile.am
registryd/registry-main.c

index 5b96147a10af638c2cee6406b2f9ca016cdac608..abbae7a4f8e4e2de49f656f16913dc0985fd3a1f 100644 (file)
@@ -5,6 +5,17 @@ INTROSPECTION_GIRS =
 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
-SUBDIRS=po registryd xml bus dbind atspi doc
+SUBDIRS=po dbind xml atspi bus registryd doc
 
 ACLOCAL_AMFLAGS=-I m4
+
+EXTRA_DIST = \
+       atspi-2.0-uninstalled.pc.in \
+       atspi-2.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = atspi-2.pc
+
+DISTCLEANFILES = \
+       atspi-2.0-uninstalled.pc \
+       atspi-2.pc
diff --git a/atspi-2-uninstalled.pc.in b/atspi-2-uninstalled.pc.in
new file mode 100644 (file)
index 0000000..6b63550
--- /dev/null
@@ -0,0 +1,6 @@
+Name: atspi
+Description: Accessibility Technology software library
+Requires: dbus-1
+Version: @VERSION@
+Libs: ${pc_top_builddir}/${pcfiledir}/atspi/libatspi.la
+Cflags: -I${pc_top_builddir}/${pcfiledir}
diff --git a/atspi-2.pc.in b/atspi-2.pc.in
new file mode 100644 (file)
index 0000000..334abec
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: atspi
+Description: Accessibility Technology software library
+Requires: dbus-1
+Version: @VERSION@
+Libs: -L${libdir} -latspi
+Cflags: -I${includedir}/at-spi-2.0
index c4b267adfcea3ab0d7686a43c53714068b8e0ff1..a8b1811c58654707148fae0f4b73f2c4ebe28ff9 100644 (file)
@@ -2,12 +2,14 @@ lib_LTLIBRARIES = libatspi.la
 
 libatspi_la_LDFLAGS = @LDFLAGS@ @LT_VERSION_INFO@ @LIBTOOL_EXPORT_OPTIONS@ -no-undefined
 
-libatspi_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \
+libatspi_la_CFLAGS = $(DBUS_CFLAGS) \
                    $(DBIND_CFLAGS)     \
+                   $(GLIB_CFLAGS)     \
                    -I$(top_srcdir)/registryd \
                     -I$(top_srcdir)
 
-libatspi_la_LIBADD = $(DBUS_GLIB_LIBS) \
+libatspi_la_LIBADD = $(DBUS_LIBS) \
+       $(GOBJ_LIBS) \
        $(X_LIBS) \
        $(top_builddir)/dbind/libdbind.la
 
@@ -27,6 +29,8 @@ libatspiinclude_HEADERS = \
        atspi-editabletext.h \
        atspi-event-listener.h \
        atspi-event-listener-private.h \
+atspi-gmain.c \
+atspi-gmain.h \
        atspi-hyperlink.h \
        atspi-hypertext.h \
        atspi-image.h \
diff --git a/atspi/atspi-gmain.c b/atspi/atspi-gmain.c
new file mode 100644 (file)
index 0000000..bb68c65
--- /dev/null
@@ -0,0 +1,679 @@
+/* -*- mode: C; c-file-style: "gnu" -*- */
+/* dbus-gmain.c GLib main loop integration
+ *
+ * Copyright (C) 2002, 2003 CodeFactory AB
+ * Copyright (C) 2005 Red Hat, Inc.
+ *
+ * Licensed under the Academic Free License version 2.1
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * This file is based on dbus-gmain.c from dbus-glib with functions renamed
+ * and unnecessary code removed.
+ */
+
+#include <config.h>
+#include <dbus/dbus.h>
+#include "glib.h"
+#include <string.h>
+
+#include <libintl.h>
+#define _(x) dgettext (GETTEXT_PACKAGE, x)
+#define N_(x) x
+
+/**
+ * @defgroup DBusGLibInternals GLib bindings implementation details
+ * @ingroup  DBusInternals
+ * @brief Implementation details of GLib bindings
+ *
+ * @{
+ */
+
+/**
+ * DBusGMessageQueue:
+ * A GSource subclass for dispatching DBusConnection messages.
+ * We need this on top of the IO handlers, because sometimes
+ * there are messages to dispatch queued up but no IO pending.
+ */
+typedef struct
+{
+  GSource source; /**< the parent GSource */
+  DBusConnection *connection; /**< the connection to dispatch */
+} DBusGMessageQueue;
+
+static gboolean message_queue_prepare  (GSource     *source,
+                                        gint        *timeout);
+static gboolean message_queue_check    (GSource     *source);
+static gboolean message_queue_dispatch (GSource     *source,
+                                        GSourceFunc  callback,
+                                        gpointer     user_data);
+
+static const GSourceFuncs message_queue_funcs = {
+  message_queue_prepare,
+  message_queue_check,
+  message_queue_dispatch,
+  NULL
+};
+
+static gboolean
+message_queue_prepare (GSource *source,
+                       gint    *timeout)
+{
+  DBusConnection *connection = ((DBusGMessageQueue *)source)->connection;
+  
+  *timeout = -1;
+
+  return (dbus_connection_get_dispatch_status (connection) == DBUS_DISPATCH_DATA_REMAINS);  
+}
+
+static gboolean
+message_queue_check (GSource *source)
+{
+  return FALSE;
+}
+
+static gboolean
+message_queue_dispatch (GSource     *source,
+                        GSourceFunc  callback,
+                        gpointer     user_data)
+{
+  DBusConnection *connection = ((DBusGMessageQueue *)source)->connection;
+
+  dbus_connection_ref (connection);
+
+  /* Only dispatch once - we don't want to starve other GSource */
+  dbus_connection_dispatch (connection);
+  
+  dbus_connection_unref (connection);
+
+  return TRUE;
+}
+
+typedef struct
+{
+  GMainContext *context;      /**< the main context */
+  GSList *ios;                /**< all IOHandler */
+  GSList *timeouts;           /**< all TimeoutHandler */
+  DBusConnection *connection; /**< NULL if this is really for a server not a connection */
+  GSource *message_queue_source; /**< DBusGMessageQueue */
+} ConnectionSetup;
+
+
+typedef struct
+{
+  ConnectionSetup *cs;
+  GSource *source;
+  DBusWatch *watch;
+} IOHandler;
+
+typedef struct
+{
+  ConnectionSetup *cs;
+  GSource *source;
+  DBusTimeout *timeout;
+} TimeoutHandler;
+
+dbus_int32_t _dbus_gmain_connection_slot = -1;
+static dbus_int32_t server_slot = -1;
+
+static ConnectionSetup*
+connection_setup_new (GMainContext   *context,
+                      DBusConnection *connection)
+{
+  ConnectionSetup *cs;
+
+  cs = g_new0 (ConnectionSetup, 1);
+
+  g_assert (context != NULL);
+  
+  cs->context = context;
+  g_main_context_ref (cs->context);  
+
+  if (connection)
+    {
+      cs->connection = connection;
+
+      cs->message_queue_source = g_source_new ((GSourceFuncs *) &message_queue_funcs,
+                                               sizeof (DBusGMessageQueue));
+      ((DBusGMessageQueue*)cs->message_queue_source)->connection = connection;
+      g_source_attach (cs->message_queue_source, cs->context);
+    }
+  
+  return cs;
+}
+
+static void
+io_handler_source_finalized (gpointer data)
+{
+  IOHandler *handler;
+
+  handler = data;
+
+  if (handler->watch)
+    dbus_watch_set_data (handler->watch, NULL, NULL);
+  
+  g_free (handler);
+}
+
+static void
+io_handler_destroy_source (void *data)
+{
+  IOHandler *handler;
+
+  handler = data;
+
+  if (handler->source)
+    {
+      GSource *source = handler->source;
+      handler->source = NULL;
+      handler->cs->ios = g_slist_remove (handler->cs->ios, handler);
+      g_source_destroy (source);
+      g_source_unref (source);
+    }
+}
+
+static void
+io_handler_watch_freed (void *data)
+{
+  IOHandler *handler;
+
+  handler = data;
+
+  handler->watch = NULL;
+
+  io_handler_destroy_source (handler);
+}
+
+static gboolean
+io_handler_dispatch (GIOChannel   *source,
+                     GIOCondition  condition,
+                     gpointer      data)
+{
+  IOHandler *handler;
+  guint dbus_condition = 0;
+  DBusConnection *connection;
+
+  handler = data;
+
+  connection = handler->cs->connection;
+  
+  if (connection)
+    dbus_connection_ref (connection);
+  
+  if (condition & G_IO_IN)
+    dbus_condition |= DBUS_WATCH_READABLE;
+  if (condition & G_IO_OUT)
+    dbus_condition |= DBUS_WATCH_WRITABLE;
+  if (condition & G_IO_ERR)
+    dbus_condition |= DBUS_WATCH_ERROR;
+  if (condition & G_IO_HUP)
+    dbus_condition |= DBUS_WATCH_HANGUP;
+
+  /* Note that we don't touch the handler after this, because
+   * dbus may have disabled the watch and thus killed the
+   * handler.
+   */
+  dbus_watch_handle (handler->watch, dbus_condition);
+  handler = NULL;
+
+  if (connection)
+    dbus_connection_unref (connection);
+  
+  return TRUE;
+}
+
+/* Attach the connection setup to the given watch, removing any
+ * previously-attached connection setup.
+ */
+static void
+connection_setup_add_watch (ConnectionSetup *cs,
+                            DBusWatch       *watch)
+{
+  guint flags;
+  GIOCondition condition;
+  GIOChannel *channel;
+  IOHandler *handler;
+  
+  if (!dbus_watch_get_enabled (watch))
+    return;
+  
+  flags = dbus_watch_get_flags (watch);
+
+  condition = G_IO_ERR | G_IO_HUP;
+  if (flags & DBUS_WATCH_READABLE)
+    condition |= G_IO_IN;
+  if (flags & DBUS_WATCH_WRITABLE)
+    condition |= G_IO_OUT;
+
+  handler = g_new0 (IOHandler, 1);
+  handler->cs = cs;
+  handler->watch = watch;
+  
+  channel = g_io_channel_unix_new (dbus_watch_get_unix_fd (watch));
+  
+  handler->source = g_io_create_watch (channel, condition);
+  g_source_set_callback (handler->source, (GSourceFunc) io_handler_dispatch, handler,
+                         io_handler_source_finalized);
+  g_source_attach (handler->source, cs->context);
+
+  cs->ios = g_slist_prepend (cs->ios, handler);
+  
+  dbus_watch_set_data (watch, handler, io_handler_watch_freed);
+  g_io_channel_unref (channel);
+}
+
+static void
+connection_setup_remove_watch (ConnectionSetup *cs,
+                               DBusWatch       *watch)
+{
+  IOHandler *handler;
+
+  handler = dbus_watch_get_data (watch);
+
+  if (handler == NULL || handler->cs != cs)
+    return;
+  
+  io_handler_destroy_source (handler);
+}
+
+static void
+timeout_handler_source_finalized (gpointer data)
+{
+  TimeoutHandler *handler;
+
+  handler = data;
+
+  if (handler->timeout)
+    dbus_timeout_set_data (handler->timeout, NULL, NULL);
+  
+  g_free (handler);
+}
+
+static void
+timeout_handler_destroy_source (void *data)
+{
+  TimeoutHandler *handler;
+
+  handler = data;
+
+  if (handler->source)
+    {
+      GSource *source = handler->source;
+      handler->source = NULL;
+      handler->cs->timeouts = g_slist_remove (handler->cs->timeouts, handler);
+      g_source_destroy (source);
+      g_source_unref (source);
+    }
+}
+
+static void
+timeout_handler_timeout_freed (void *data)
+{
+  TimeoutHandler *handler;
+
+  handler = data;
+
+  handler->timeout = NULL;
+
+  timeout_handler_destroy_source (handler);
+}
+
+static gboolean
+timeout_handler_dispatch (gpointer      data)
+{
+  TimeoutHandler *handler;
+
+  handler = data;
+
+  dbus_timeout_handle (handler->timeout);
+  
+  return TRUE;
+}
+
+static void
+connection_setup_add_timeout (ConnectionSetup *cs,
+                              DBusTimeout     *timeout)
+{
+  TimeoutHandler *handler;
+  
+  if (!dbus_timeout_get_enabled (timeout))
+    return;
+  
+  g_assert (dbus_timeout_get_data (timeout) == NULL);
+
+  handler = g_new0 (TimeoutHandler, 1);
+  handler->cs = cs;
+  handler->timeout = timeout;
+
+  handler->source = g_timeout_source_new (dbus_timeout_get_interval (timeout));
+  g_source_set_callback (handler->source, timeout_handler_dispatch, handler,
+                         timeout_handler_source_finalized);
+  g_source_attach (handler->source, handler->cs->context);
+
+  cs->timeouts = g_slist_prepend (cs->timeouts, handler);
+
+  dbus_timeout_set_data (timeout, handler, timeout_handler_timeout_freed);
+}
+
+static void
+connection_setup_remove_timeout (ConnectionSetup *cs,
+                                 DBusTimeout       *timeout)
+{
+  TimeoutHandler *handler;
+  
+  handler = dbus_timeout_get_data (timeout);
+
+  if (handler == NULL)
+    return;
+  
+  timeout_handler_destroy_source (handler);
+}
+
+static void
+connection_setup_free (ConnectionSetup *cs)
+{
+  while (cs->ios)
+    io_handler_destroy_source (cs->ios->data);
+
+  while (cs->timeouts)
+    timeout_handler_destroy_source (cs->timeouts->data);
+
+  if (cs->message_queue_source)
+    {
+      GSource *source;
+
+      source = cs->message_queue_source;
+      cs->message_queue_source = NULL;
+
+      g_source_destroy (source);
+      g_source_unref (source);
+    }
+  
+  g_main_context_unref (cs->context);
+  g_free (cs);
+}
+
+static dbus_bool_t
+add_watch (DBusWatch *watch,
+          gpointer   data)
+{
+  ConnectionSetup *cs;
+
+  cs = data;
+
+  connection_setup_add_watch (cs, watch);
+  
+  return TRUE;
+}
+
+static void
+remove_watch (DBusWatch *watch,
+             gpointer   data)
+{
+  ConnectionSetup *cs;
+
+  cs = data;
+
+  connection_setup_remove_watch (cs, watch);
+}
+
+static void
+watch_toggled (DBusWatch *watch,
+               void      *data)
+{
+  /* Because we just exit on OOM, enable/disable is
+   * no different from add/remove
+   */
+  if (dbus_watch_get_enabled (watch))
+    add_watch (watch, data);
+  else
+    remove_watch (watch, data);
+}
+
+static dbus_bool_t
+add_timeout (DBusTimeout *timeout,
+            void        *data)
+{
+  ConnectionSetup *cs;
+
+  cs = data;
+  
+  if (!dbus_timeout_get_enabled (timeout))
+    return TRUE;
+
+  connection_setup_add_timeout (cs, timeout);
+
+  return TRUE;
+}
+
+static void
+remove_timeout (DBusTimeout *timeout,
+               void        *data)
+{
+  ConnectionSetup *cs;
+
+  cs = data;
+
+  connection_setup_remove_timeout (cs, timeout);
+}
+
+static void
+timeout_toggled (DBusTimeout *timeout,
+                 void        *data)
+{
+  /* Because we just exit on OOM, enable/disable is
+   * no different from add/remove
+   */
+  if (dbus_timeout_get_enabled (timeout))
+    add_timeout (timeout, data);
+  else
+    remove_timeout (timeout, data);
+}
+
+static void
+wakeup_main (void *data)
+{
+  ConnectionSetup *cs = data;
+
+  g_main_context_wakeup (cs->context);
+}
+
+
+/* Move to a new context */
+static ConnectionSetup*
+connection_setup_new_from_old (GMainContext    *context,
+                               ConnectionSetup *old)
+{
+  ConnectionSetup *cs;
+
+  g_assert (old->context != context);
+  
+  cs = connection_setup_new (context, old->connection);
+  
+  while (old->ios != NULL)
+    {
+      IOHandler *handler = old->ios->data;
+
+      connection_setup_add_watch (cs, handler->watch);
+      /* The old handler will be removed from old->ios as a side-effect */
+    }
+
+  while (old->timeouts != NULL)
+    {
+      TimeoutHandler *handler = old->timeouts->data;
+
+      connection_setup_add_timeout (cs, handler->timeout);
+    }
+
+  return cs;
+}
+
+/** @} */ /* End of GLib bindings internals */
+
+/** @addtogroup DBusGLib
+ * @{
+ */
+
+/**
+ * atspi_dbus_connection_setup_with_g_main:
+ * @connection: the connection
+ * @context: the #GMainContext or #NULL for default context
+ *
+ * Sets the watch and timeout functions of a #DBusConnection
+ * to integrate the connection with the GLib main loop.
+ * Pass in #NULL for the #GMainContext unless you're
+ * doing something specialized.
+ *
+ * If called twice for the same context, does nothing the second
+ * time. If called once with context A and once with context B,
+ * context B replaces context A as the context monitoring the
+ * connection.
+ */
+void
+atspi_dbus_connection_setup_with_g_main (DBusConnection *connection,
+                                  GMainContext   *context)
+{
+  ConnectionSetup *old_setup;
+  ConnectionSetup *cs;
+  
+  /* FIXME we never free the slot, so its refcount just keeps growing,
+   * which is kind of broken.
+   */
+  dbus_connection_allocate_data_slot (&_dbus_gmain_connection_slot);
+  if (_dbus_gmain_connection_slot < 0)
+    goto nomem;
+
+  if (context == NULL)
+    context = g_main_context_default ();
+
+  cs = NULL;
+  
+  old_setup = dbus_connection_get_data (connection, _dbus_gmain_connection_slot);
+  if (old_setup != NULL)
+    {
+      if (old_setup->context == context)
+        return; /* nothing to do */
+
+      cs = connection_setup_new_from_old (context, old_setup);
+      
+      /* Nuke the old setup */
+      dbus_connection_set_data (connection, _dbus_gmain_connection_slot, NULL, NULL);
+      old_setup = NULL;
+    }
+
+  if (cs == NULL)
+    cs = connection_setup_new (context, connection);
+
+  if (!dbus_connection_set_data (connection, _dbus_gmain_connection_slot, cs,
+                                 (DBusFreeFunction)connection_setup_free))
+    goto nomem;
+  
+  if (!dbus_connection_set_watch_functions (connection,
+                                            add_watch,
+                                            remove_watch,
+                                            watch_toggled,
+                                            cs, NULL))
+    goto nomem;
+
+  if (!dbus_connection_set_timeout_functions (connection,
+                                              add_timeout,
+                                              remove_timeout,
+                                              timeout_toggled,
+                                              cs, NULL))
+    goto nomem;
+    
+  dbus_connection_set_wakeup_main_function (connection,
+                                           wakeup_main,
+                                           cs, NULL);
+      
+  return;
+
+ nomem:
+  g_error ("Not enough memory to set up DBusConnection for use with GLib");
+}
+
+/**
+ * atspi_dbus_server_setup_with_g_main:
+ * @server: the server
+ * @context: the #GMainContext or #NULL for default
+ *
+ * Sets the watch and timeout functions of a #DBusServer
+ * to integrate the server with the GLib main loop.
+ * In most cases the context argument should be #NULL.
+ *
+ * If called twice for the same context, does nothing the second
+ * time. If called once with context A and once with context B,
+ * context B replaces context A as the context monitoring the
+ * connection.
+ */
+void
+atspi_dbus_server_setup_with_g_main (DBusServer   *server,
+                               GMainContext *context)
+{
+  ConnectionSetup *old_setup;
+  ConnectionSetup *cs;
+  
+  /* FIXME we never free the slot, so its refcount just keeps growing,
+   * which is kind of broken.
+   */
+  dbus_server_allocate_data_slot (&server_slot);
+  if (server_slot < 0)
+    goto nomem;
+
+  if (context == NULL)
+    context = g_main_context_default ();
+
+  cs = NULL;
+  
+  old_setup = dbus_server_get_data (server, server_slot);
+  if (old_setup != NULL)
+    {
+      if (old_setup->context == context)
+        return; /* nothing to do */
+
+      cs = connection_setup_new_from_old (context, old_setup);
+      
+      /* Nuke the old setup */
+      if (!dbus_server_set_data (server, server_slot, NULL, NULL))
+        goto nomem;
+      old_setup = NULL;
+    }
+
+  if (cs == NULL)
+    cs = connection_setup_new (context, NULL);
+
+  if (!dbus_server_set_data (server, server_slot, cs,
+                             (DBusFreeFunction)connection_setup_free))
+    goto nomem;
+  
+  if (!dbus_server_set_watch_functions (server,
+                                        add_watch,
+                                        remove_watch,
+                                        watch_toggled,
+                                        cs, NULL))
+    goto nomem;
+
+  if (!dbus_server_set_timeout_functions (server,
+                                          add_timeout,
+                                          remove_timeout,
+                                          timeout_toggled,
+                                          cs, NULL))
+    goto nomem;
+      
+  return;
+
+ nomem:
+  g_error ("Not enough memory to set up DBusServer for use with GLib");
+}
diff --git a/atspi/atspi-gmain.h b/atspi/atspi-gmain.h
new file mode 100644 (file)
index 0000000..238d3e3
--- /dev/null
@@ -0,0 +1,36 @@
+/* -*- mode: C; c-file-style: "gnu" -*- */
+/* atspi-gmain.h atspi dbus gmain prototypes
+ *
+ * Licensed under the Academic Free License version 2.1
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * This file is based on dbus-gmain.c from dbus-glib with functions renamed
+ * and unnecessary code removed.
+ */
+
+#include <config.h>
+
+#ifndef _ATSPI_GMAIN_H
+#define _ATSPI_GMAIN_H
+
+void
+atspi_dbus_connection_setup_with_g_main (DBusConnection *connection,
+                                  GMainContext   *context);
+
+void
+atspi_dbus_server_setup_with_g_main (DBusServer   *server,
+                               GMainContext *context);
+#endif
index 248f0d93616d45880f484eccc6ce19b76ae1bda3..9c2471a0e485e89b0ea848299c3224cd5475e830 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "atspi-private.h"
 #include "X11/Xlib.h"
-#include "dbus/dbus-glib.h"
+#include "atspi-gmain.h"
 #include <stdio.h>
 #include <string.h>
 
@@ -834,7 +834,7 @@ atspi_init (void)
   if (!bus)
     return 2;
   dbus_bus_register (bus, &error);
-  dbus_connection_setup_with_g_main(bus, g_main_context_default());
+  atspi_dbus_connection_setup_with_g_main(bus, g_main_context_default());
   dbus_connection_add_filter (bus, atspi_dbus_filter, NULL, NULL);
   dbind_set_timeout (1000);
   match = g_strdup_printf ("type='signal',interface='%s',member='AddAccessible'", atspi_interface_cache);
index 57214a5456a834fc79542325d695cc4aa620d8ee..79157601ae8f9e728c7f7e785ebeabf88a555011 100644 (file)
@@ -49,4 +49,5 @@
 #include "atspi-text.h"
 #include "atspi-value.h"
 
+#include "atspi-gmain.h"
 #endif
index 635b92c3205ec8797ae04ffd74d018c598e799c5..f660a627f82a749da98e03b8ea1bfb905de20ddc 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT([at-spi2-core], [1.91.91], [accessibility-atspi@lists.linux-foundation.org])
+AC_INIT([at-spi2-core], [1.91.92], [accessibility-atspi@lists.linux-foundation.org])
 AC_PREREQ([2.59])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_MACRO_DIR([m4])
@@ -51,10 +51,6 @@ PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.26.0])
 AC_SUBST(GIO_LIBS)
 AC_SUBST(GIO_CFLAGS)
 
-PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
-AC_SUBST(DBUS_GLIB_LIBS)
-AC_SUBST(DBUS_GLIB_CFLAGS)
-
 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
 AC_SUBST(GOBJ_LIBS)
 AC_SUBST(GOBJ_CFLAGS)
@@ -203,6 +199,8 @@ dbind/dbind-config.h
        bus/Makefile
 doc/Makefile
 doc/libatspi/Makefile
+atspi-2.pc
+atspi-2-uninstalled.pc
 ])
 
 AC_OUTPUT
index 0d18c2f3004eb8ec09b3f1cf6e1e9b3c8aa9a036..3acb38a07dc577da7a4a15fabc13cc1424ea2beb 100644 (file)
@@ -72,7 +72,7 @@ dbind_send_and_allow_reentry (DBusConnection * bus, DBusMessage * message, DBusE
     return dbus_connection_send_with_reply_and_block (bus, message, dbind_timeout, error);
 
   closure.reply = NULL;
-  dbus_connection_setup_with_g_main(bus, NULL);
+  atspi_dbus_connection_setup_with_g_main(bus, NULL);
   if (!dbus_connection_send_with_reply (bus, message, &pending, dbind_timeout))
       return NULL;
   if (!pending)
index b36fc1889562982fb824fb3f0e964d238c7e7bec..a3276588d96340eb47127d71571415dbf1821957 100644 (file)
@@ -3,7 +3,7 @@ libexec_PROGRAMS = at-spi2-registryd
 at_spi2_registryd_CFLAGS =     \
        $(GLIB_CFLAGS)          \
        $(GIO_CFLAGS)           \
-       $(DBUS_GLIB_CFLAGS)     \
+       $(DBUS_CFLAGS)  \
        $(GOBJ_CFLAGS)          \
        $(ATK_CFLAGS)           \
        -I$(top_srcdir)         \
@@ -13,7 +13,7 @@ at_spi2_registryd_LDADD =     \
        ../atspi/libatspi.la \
        $(GLIB_LIBS)            \
        $(GIO_LIBS)             \
-       $(DBUS_GLIB_LIBS)       \
+       $(DBUS_LIBS)    \
        $(GOBJ_CFLAGS)          \
        $(ATK_LIBS)             \
        $(X_LIBS)               \
index 1c864859ccf35da9d34dd524f9e36fc0a25cb0c7..4bb0dd9856f25ae1b5470981d6ac75ef6fee8318 100644 (file)
@@ -228,7 +228,7 @@ main (int argc, char **argv)
   }
 
   mainloop = g_main_loop_new (NULL, FALSE);
-  dbus_connection_setup_with_g_main(bus, NULL);
+  atspi_dbus_connection_setup_with_g_main(bus, NULL);
 
   ret = dbus_bus_request_name(bus, dbus_name, DBUS_NAME_FLAG_DO_NOT_QUEUE, &error);
   if (ret == DBUS_REQUEST_NAME_REPLY_EXISTS)