[at-spi2-atk/at-spi2-atk-0-4: 7/7] Disable p2p functionality if AT_SPI_CLIENT is set
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk/at-spi2-atk-0-4: 7/7] Disable p2p functionality if AT_SPI_CLIENT is set
- Date: Fri, 1 Oct 2010 19:01:13 +0000 (UTC)
commit 8bde24500d86b61365f422eb3ec58943af0e5984
Author: Mike Gorse <mgorse novell com>
Date: Fri Oct 1 10:40:52 2010 -0400
Disable p2p functionality if AT_SPI_CLIENT is set
atk-adaptor/adaptors/application-adaptor.c | 8 +++++++-
atk-adaptor/event.c | 7 +++++--
2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/atk-adaptor/adaptors/application-adaptor.c b/atk-adaptor/adaptors/application-adaptor.c
index 1877b8f..dd162af 100644
--- a/atk-adaptor/adaptors/application-adaptor.c
+++ b/atk-adaptor/adaptors/application-adaptor.c
@@ -96,7 +96,13 @@ impl_get_app_bus(DBusConnection *bus, DBusMessage *msg, void *data)
DBusMessage *reply;
reply = dbus_message_new_method_return(msg);
-if(reply) dbus_message_append_args(reply, DBUS_TYPE_STRING, &(spi_global_app_data->app_bus_addr), DBUS_TYPE_INVALID);
+if (reply)
+ {
+ const char *retval = (g_getenv ("AT_SPI_CLIENT") ?
+ "":
+ spi_global_app_data->app_bus_addr);
+ dbus_message_append_args(reply, DBUS_TYPE_STRING, &retval, DBUS_TYPE_INVALID);
+ }
return reply;
}
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index 28de5ff..4b23c64 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -78,9 +78,12 @@ send_and_allow_reentry (DBusConnection * bus, DBusMessage * message)
{
DBusPendingCall *pending;
SpiReentrantCallClosure closure;
+ GMainContext *main_context;
- closure.loop = g_main_loop_new (spi_global_app_data->main_context, FALSE);
- switch_main_context (spi_global_app_data->main_context);
+ main_context = (g_getenv ("AT_SPI_CLIENT") ? NULL :
+ spi_global_app_data->main_context);
+ closure.loop = g_main_loop_new (main_context, FALSE);
+ switch_main_context (main_context);
if (!dbus_connection_send_with_reply (bus, message, &pending, -1))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]