aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-19 15:49:00 -0500
committerTed Gould <ted@gould.cx>2010-07-19 15:49:00 -0500
commitfe94f6d9c9e676565e73bcd7597540411901f87b (patch)
tree376cd882f4ed21c840fb8430ca97827a97d0d9ea /libdbusmenu-glib
parentd3eff171a5dbfcdc1da55164097255244b5dc3a6 (diff)
downloadlibdbusmenu-fe94f6d9c9e676565e73bcd7597540411901f87b.tar.gz
libdbusmenu-fe94f6d9c9e676565e73bcd7597540411901f87b.tar.bz2
libdbusmenu-fe94f6d9c9e676565e73bcd7597540411901f87b.zip
Fleshing out the callback, need some more data to test though.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/client.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 2328fb1..ff5b33b 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -340,6 +340,33 @@ get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec)
static void
get_properties_callback (DBusGProxy *proxy, GPtrArray *OUT_properties, GError *error, gpointer userdata)
{
+ GArray * listeners = (GArray *)userdata;
+ int i;
+
+ if (error != NULL) {
+ /* If we get an error, all our callbacks need to hear about it. */
+ g_warning("Group Properties error: %s", error->message);
+ for (i = 0; i < listeners->len; i++) {
+ properties_listener_t * listener = &g_array_index(listeners, properties_listener_t, i);
+ listener->callback(proxy, NULL, error, listener->user_data);
+ }
+ g_array_free(listeners, TRUE);
+ return;
+ }
+
+ /* Callback all the folks we can find */
+ for (i = 0; i < OUT_properties->len; i++) {
+ g_error("Properties type: %s", G_OBJECT_TYPE_NAME(g_ptr_array_index(OUT_properties, i)));
+
+ }
+
+ /* Provide errors for those who we can't */
+ for (i = 0; i < listeners->len; i++) {
+
+ }
+
+ /* Clean up */
+ g_array_free(listeners, TRUE);
return;
}
@@ -357,6 +384,7 @@ get_properties_idle (gpointer user_data)
return FALSE;
}
+ /* Build up an ID list to pass */
GArray * idlist = g_array_new(FALSE, FALSE, sizeof(gint));
gint i;
for (i = 0; i < priv->delayed_property_listeners->len; i++) {