From f99993dcaa21a84d5cb7c8bf91796d73c169a58f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 30 Mar 2012 15:15:17 -0500 Subject: Setting up our callback function --- libdbusmenu-glib/client.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 29a8565..1bc60a6 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1554,6 +1554,19 @@ menuitem_call_cb (GObject * proxy, GAsyncResult * res, gpointer userdata) return; } +/* The callback from the dbus message to pass events to the + to the server en masse */ +static void +event_group_cb (GObject * proxy, GAsyncResult * res, gpointer user_data) +{ + GList * events = (GList *)user_data; + + + g_list_foreach(events, (GFunc)event_data_end, NULL); + g_list_free(events); + return; +} + /* Turn an event structure into the variant builder form */ static void events_to_builder (gpointer data, gpointer user_data) @@ -1599,7 +1612,7 @@ event_idle_cb (gpointer user_data) G_DBUS_CALL_FLAGS_NONE, 1000, /* timeout */ NULL, /* cancellable */ - NULL /* TODO group callback */, levents); + event_group_cb, levents); } else { g_dbus_proxy_call(priv->menuproxy, "EventGroup", -- cgit v1.2.3