diff options
author | Ted Gould <ted@gould.cx> | 2010-07-09 10:50:25 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-07-09 10:50:25 -0500 |
commit | 56dd41e5fcadc452ad1c5b0892e3cd0b5fa3da2f (patch) | |
tree | ffc69cfd3616b761b36594a00c730bf90463de29 /tests/service-version-multiwatch-manager.c | |
parent | 5731c1e07e2c2ca4d192213b3128bc5b7a3339b8 (diff) | |
download | libayatana-indicator-56dd41e5fcadc452ad1c5b0892e3cd0b5fa3da2f.tar.gz libayatana-indicator-56dd41e5fcadc452ad1c5b0892e3cd0b5fa3da2f.tar.bz2 libayatana-indicator-56dd41e5fcadc452ad1c5b0892e3cd0b5fa3da2f.zip |
Delaying the watchers to ensure that we don't dbus activate, and removing the session.conf to even allow for that.
Diffstat (limited to 'tests/service-version-multiwatch-manager.c')
-rw-r--r-- | tests/service-version-multiwatch-manager.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/service-version-multiwatch-manager.c b/tests/service-version-multiwatch-manager.c index 7293d43..2edbd73 100644 --- a/tests/service-version-multiwatch-manager.c +++ b/tests/service-version-multiwatch-manager.c @@ -5,6 +5,7 @@ static GMainLoop * mainloop = NULL; static gboolean passed = FALSE; +static IndicatorServiceManager * goodis = NULL; gboolean timeout (gpointer data) @@ -25,6 +26,17 @@ connection_good (IndicatorServiceManager * sm, gboolean connected, gpointer user return; } +gboolean +delay_start (gpointer data) +{ + goodis = indicator_service_manager_new_version("org.ayatana.version.good", SERVICE_VERSION_GOOD); + g_signal_connect(G_OBJECT(goodis), INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connection_good), NULL); + + g_timeout_add_seconds(1, timeout, NULL); + + return FALSE; +} + int main (int argc, char ** argv) { @@ -32,10 +44,7 @@ main (int argc, char ** argv) g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); g_print("Manager: DBUS_SESSION_BUS_ADDRESS = %s\n", g_getenv("DBUS_SESSION_BUS_ADDRESS")); - IndicatorServiceManager * goodis = indicator_service_manager_new_version("org.ayatana.version.good", SERVICE_VERSION_GOOD); - g_signal_connect(G_OBJECT(goodis), INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connection_good), NULL); - - g_timeout_add_seconds(1, timeout, NULL); + g_timeout_add(500, delay_start, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); |