[glib] GDBusObjectManagerClient: Emit signals on proxy before emitting on manager
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GDBusObjectManagerClient: Emit signals on proxy before emitting on manager
- Date: Mon, 15 Aug 2011 09:46:45 +0000 (UTC)
commit 20a4f2578fe74e80f58c442356bd2b91d790d7f8
Author: David Zeuthen <davidz redhat com>
Date: Mon Aug 15 05:43:24 2011 -0400
GDBusObjectManagerClient: Emit signals on proxy before emitting on manager
This is needed because the proxy may need to update its internal state
which a signal handler connected to the manager may rely on.
Signed-off-by: David Zeuthen <davidz redhat com>
gio/gdbusobjectmanagerclient.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gio/gdbusobjectmanagerclient.c b/gio/gdbusobjectmanagerclient.c
index 0ccd560..9e8368d 100644
--- a/gio/gdbusobjectmanagerclient.c
+++ b/gio/gdbusobjectmanagerclient.c
@@ -1021,6 +1021,10 @@ signal_cb (GDBusConnection *connection,
NULL);
}
/* ... and then synthesize the signal */
+ g_signal_emit_by_name (interface,
+ "g-properties-changed",
+ changed_properties,
+ invalidated_properties);
g_signal_emit (manager,
signals[INTERFACE_PROXY_PROPERTIES_CHANGED_SIGNAL],
0,
@@ -1028,10 +1032,6 @@ signal_cb (GDBusConnection *connection,
interface,
changed_properties,
invalidated_properties);
- g_signal_emit_by_name (interface,
- "g-properties-changed",
- changed_properties,
- invalidated_properties);
g_object_unref (interface);
}
g_variant_unref (changed_properties);
@@ -1044,6 +1044,11 @@ signal_cb (GDBusConnection *connection,
interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object_proxy), interface_name);
if (interface != NULL)
{
+ g_signal_emit_by_name (interface,
+ "g-signal",
+ sender_name,
+ signal_name,
+ parameters);
g_signal_emit (manager,
signals[INTERFACE_PROXY_SIGNAL_SIGNAL],
0,
@@ -1052,11 +1057,6 @@ signal_cb (GDBusConnection *connection,
sender_name,
signal_name,
parameters);
- g_signal_emit_by_name (interface,
- "g-signal",
- sender_name,
- signal_name,
- parameters);
g_object_unref (interface);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]