[at-spi2-atk/mgorse: 6/6] Fixes for returning accessibles
- From: Mike Gorse <mgorse src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [at-spi2-atk/mgorse: 6/6] Fixes for returning accessibles
- Date: Wed, 11 Nov 2009 14:21:56 +0000 (UTC)
commit c78ec6761e123d26c2264e88cb450b41510303d9
Author: Mike Gorse <mgorse novell com>
Date: Wed Nov 11 09:23:41 2009 -0500
Fixes for returning accessibles
atk-adaptor/accessible-adaptor.c | 2 +-
atk-adaptor/accessible-marshaller.c | 15 +++++++++------
atk-adaptor/accessible-marshaller.h | 2 +-
3 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/atk-adaptor/accessible-adaptor.c b/atk-adaptor/accessible-adaptor.c
index ce9c3c9..124a702 100644
--- a/atk-adaptor/accessible-adaptor.c
+++ b/atk-adaptor/accessible-adaptor.c
@@ -114,7 +114,7 @@ impl_GetChildAtIndex (DBusConnection *bus,
if (!dbus_message_get_args (message, &error, DBUS_TYPE_INT32, &i, DBUS_TYPE_INVALID))
return spi_dbus_general_error (message);
child = atk_object_ref_accessible_child (object, i);
- return spi_dbus_return_object (message, child, FALSE, FALSE);
+ return spi_dbus_return_object (message, child, TRUE, TRUE);
}
static DBusMessage *
diff --git a/atk-adaptor/accessible-marshaller.c b/atk-adaptor/accessible-marshaller.c
index 2d5e4fd..d203430 100644
--- a/atk-adaptor/accessible-marshaller.c
+++ b/atk-adaptor/accessible-marshaller.c
@@ -48,13 +48,13 @@ spi_dbus_append_name_and_path_inner (DBusMessageIter *iter, const char *bus_name
}
void
-spi_dbus_append_name_and_path (DBusMessage *message, DBusMessageIter *iter, AtkObject *obj, gboolean unref)
+spi_dbus_append_name_and_path (DBusMessage *message, DBusMessageIter *iter, AtkObject *obj, gboolean do_register, gboolean unref)
{
gchar *path;
DBusMessageIter iter_struct;
- const char *bus_name = dbus_message_get_sender (message);
+ const char *bus_name = dbus_bus_get_unique_name (atk_adaptor_app_data->bus);
- path = atk_dbus_object_to_path (obj, FALSE);
+ path = atk_dbus_object_to_path (obj, do_register);
if (!path)
path = g_strdup (SPI_DBUS_PATH_NULL);
@@ -79,8 +79,8 @@ spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean do_regist
if (reply)
{
DBusMessageIter iter;
- dbus_message_iter_init_append (message, &iter);
- spi_dbus_append_name_and_path (message, &iter, obj, unref);
+ dbus_message_iter_init_append (reply, &iter);
+ spi_dbus_append_name_and_path (message, &iter, obj, do_register, unref);
}
return reply;
@@ -129,6 +129,7 @@ spi_dbus_return_sub_object (DBusMessage *message, GObject *sub, GObject *contain
dbus_bool_t
spi_dbus_return_v_object (DBusMessageIter *iter, AtkObject *obj, int unref)
{
+ DBusMessageIter iter_variant;
char *path;
path = atk_dbus_object_to_path (obj, FALSE);
@@ -139,7 +140,9 @@ spi_dbus_return_v_object (DBusMessageIter *iter, AtkObject *obj, int unref)
if (unref)
g_object_unref (obj);
- return droute_return_v_object (iter, path);
+ dbus_message_iter_open_container (iter, DBUS_TYPE_VARIANT, "(so)", &iter_variant);
+ spi_dbus_append_name_and_path_inner (&iter_variant, NULL, path);
+ dbus_message_iter_close_container (iter, &iter_variant);
}
/*---------------------------------------------------------------------------*/
diff --git a/atk-adaptor/accessible-marshaller.h b/atk-adaptor/accessible-marshaller.h
index 588c50d..267989d 100644
--- a/atk-adaptor/accessible-marshaller.h
+++ b/atk-adaptor/accessible-marshaller.h
@@ -31,7 +31,7 @@ void
spi_dbus_append_name_and_path_inner (DBusMessageIter *iter, const char *bus_name, const char *path);
void
-spi_dbus_append_name_and_path (DBusMessage *message, DBusMessageIter *iter, AtkObject *obj, gboolean unref);
+spi_dbus_append_name_and_path (DBusMessage *message, DBusMessageIter *iter, AtkObject *obj, gboolean do_register, gboolean unref);
DBusMessage *
spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean do_register, gboolean unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]