diff options
author | Ted Gould <ted@canonical.com> | 2009-05-04 14:07:16 +0100 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-05-04 14:07:16 +0100 |
commit | 22e6abdd0a1bea1ee257da6eeb767228aeff212c (patch) | |
tree | dfca37685c8ad45eb1f72a9e19b42c14d786ca0a /tests | |
parent | f1a04e66561c54fc3120239e2ee5a0240ab50656 (diff) | |
download | libdbusmenu-22e6abdd0a1bea1ee257da6eeb767228aeff212c.tar.gz libdbusmenu-22e6abdd0a1bea1ee257da6eeb767228aeff212c.tar.bz2 libdbusmenu-22e6abdd0a1bea1ee257da6eeb767228aeff212c.zip |
Some timers to get things lined up correctly and other little
cleanups to stop breaking this.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-glib-layout-client.c | 4 | ||||
-rw-r--r-- | tests/test-glib-layout-server.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index e6fc1ba..bc8eb2c 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -23,7 +23,9 @@ main (int argc, char ** argv) { g_type_init(); - DbusmenuClient * client = dbusmenu_client_new(":1.1", "/org/test"); + g_usleep(10000); + + DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test"); g_timeout_add_seconds(2, timer_func, client); diff --git a/tests/test-glib-layout-server.c b/tests/test-glib-layout-server.c index d6f9f3d..8539a2b 100644 --- a/tests/test-glib-layout-server.c +++ b/tests/test-glib-layout-server.c @@ -1,6 +1,10 @@ #include <glib.h> +#include <dbus/dbus.h> +#include <dbus/dbus-glib.h> +#include <dbus/dbus-glib-lowlevel.h> + #include <libdbusmenu-glib/server.h> #include <libdbusmenu-glib/menuitem.h> @@ -51,10 +55,12 @@ main (int argc, char ** argv) { g_type_init(); + g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); + server = dbusmenu_server_new("/org/test"); timer_func(NULL); - g_timeout_add(250, timer_func, NULL); + g_timeout_add(2500, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); |