[at-spi2-core: 27/47] emit_event(): Take an SpiReference, not a (name, path) pair
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 27/47] emit_event(): Take an SpiReference, not a (name, path) pair
- Date: Wed, 13 Jul 2022 03:08:29 +0000 (UTC)
commit 4ec513339c0f520a532f5928ee483cbd62a3bc8d
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Jul 11 15:05:01 2022 -0500
emit_event(): Take an SpiReference, not a (name, path) pair
registryd/registry.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/registryd/registry.c b/registryd/registry.c
index eac8cda4..bb20c4ab 100644
--- a/registryd/registry.c
+++ b/registryd/registry.c
@@ -180,8 +180,7 @@ emit_event (DBusConnection *bus,
const char *minor,
dbus_int32_t detail1,
dbus_int32_t detail2,
- const char *name,
- const char *path)
+ SpiReference *app)
{
DBusMessage *sig;
DBusMessageIter iter, iter_variant, iter_array;
@@ -196,7 +195,7 @@ emit_event (DBusConnection *bus,
dbus_message_iter_open_container (&iter, DBUS_TYPE_VARIANT, "(so)",
&iter_variant);
- append_reference (&iter_variant, name, path);
+ append_reference (&iter_variant, app->name, app->path);
dbus_message_iter_close_container (&iter, &iter_variant);
dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "{sv}",
@@ -215,7 +214,7 @@ add_application (SpiRegistry *reg, SpiReference *app_root)
g_ptr_array_add (reg->apps, app_root);
index = reg->apps->len - 1;
- emit_event (reg->bus, SPI_DBUS_INTERFACE_EVENT_OBJECT, "ChildrenChanged", "add", index, 0, app_root->name,
app_root->path);
+ emit_event (reg->bus, SPI_DBUS_INTERFACE_EVENT_OBJECT, "ChildrenChanged", "add", index, 0, app_root);
}
static void
@@ -248,7 +247,7 @@ remove_application (SpiRegistry *reg, guint index)
SpiReference *ref = g_ptr_array_index (reg->apps, index);
spi_remove_device_listeners (reg->dec, ref->name);
- emit_event (reg->bus, SPI_DBUS_INTERFACE_EVENT_OBJECT, "ChildrenChanged", "remove", index, 0, ref->name,
ref->path);
+ emit_event (reg->bus, SPI_DBUS_INTERFACE_EVENT_OBJECT, "ChildrenChanged", "remove", index, 0, ref);
g_ptr_array_remove_index (reg->apps, index);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]