diff options
Diffstat (limited to 'tests/test-json-server.c')
-rw-r--r-- | tests/test-json-server.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test-json-server.c b/tests/test-json-server.c index 6a53aec..7165838 100644 --- a/tests/test-json-server.c +++ b/tests/test-json-server.c @@ -30,14 +30,14 @@ with this program. If not, see <http://www.gnu.org/licenses/>. static GMainLoop * mainloop = NULL; -static gboolean -timer_func (gpointer data) +static void +root_activate (void) { g_debug("Dumping callgrind data"); CALLGRIND_DUMP_STATS_AT("exported"); CALLGRIND_STOP_INSTRUMENTATION; g_main_loop_quit(mainloop); - return FALSE; + return; } static void @@ -54,14 +54,14 @@ on_bus (GDBusConnection * connection, const gchar * name, gpointer user_data) return; } + g_signal_connect(G_OBJECT(root), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(root_activate), NULL); + g_debug("Starting Callgrind"); CALLGRIND_START_INSTRUMENTATION; CALLGRIND_ZERO_STATS; CALLGRIND_TOGGLE_COLLECT; dbusmenu_server_set_root(server, root); - g_timeout_add_seconds(100, timer_func, NULL); - return; } |