aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-layout-client.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-05-05 18:58:23 +0100
committerTed Gould <ted@canonical.com>2009-05-05 18:58:23 +0100
commite91e2504652a59870ac5e439fcdf0b452fd87d70 (patch)
tree989438f9eb44e9eedd86a695569569d4170accdb /tests/test-glib-layout-client.c
parent8b7a878309959f34b08b321f0f04457a31f52826 (diff)
downloadlibdbusmenu-e91e2504652a59870ac5e439fcdf0b452fd87d70.tar.gz
libdbusmenu-e91e2504652a59870ac5e439fcdf0b452fd87d70.tar.bz2
libdbusmenu-e91e2504652a59870ac5e439fcdf0b452fd87d70.zip
Loving the signal handling
Diffstat (limited to 'tests/test-glib-layout-client.c')
-rw-r--r--tests/test-glib-layout-client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c
index 850b17c..0a8aa13 100644
--- a/tests/test-glib-layout-client.c
+++ b/tests/test-glib-layout-client.c
@@ -9,6 +9,12 @@ static guint layouton = 0;
static GMainLoop * mainloop = NULL;
static gboolean passed = TRUE;
+static void
+layout_updated (DbusmenuClient * client, gpointer data)
+{
+ g_debug("Layout Updated");
+}
+
static gboolean
timer_func (gpointer data)
{
@@ -26,6 +32,7 @@ main (int argc, char ** argv)
g_usleep(500000);
DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test");
+ g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL);
g_timeout_add_seconds(6, timer_func, client);