From e7470be7bf2d59b5e54538a728d5be3a8d90140c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 13 Feb 2016 06:26:42 +0100 Subject: [PATCH] tests: Port testlockbutton to GTask Get rid of deprecations that way. --- tests/testlockbutton.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/testlockbutton.c b/tests/testlockbutton.c index d6540d0282..96b6891d13 100644 --- a/tests/testlockbutton.c +++ b/tests/testlockbutton.c @@ -91,13 +91,13 @@ acquire_async (GPermission *permission, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; + GTask *result; g_print ("GTestPermission::acquire_async\n"); - result = g_simple_async_result_new ((GObject*)permission, - callback, - user_data, - acquire_async); - g_simple_async_result_complete (result); + result = g_task_new ((GObject*)permission, + cancellable, + callback, + user_data); + g_task_return_boolean (result, TRUE); g_object_unref (result); } @@ -126,12 +126,12 @@ release_async (GPermission *permission, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; - result = g_simple_async_result_new ((GObject*)permission, - callback, - user_data, - acquire_async); - g_simple_async_result_complete (result); + GTask *result; + result = g_task_new ((GObject*)permission, + cancellable, + callback, + user_data); + g_task_return_boolean (result, TRUE); g_object_unref (result); }