diff options
author | Benjamin Otte <otte@redhat.com> | 2016-02-13 06:26:42 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-02-13 06:26:42 +0100 |
commit | e7470be7bf2d59b5e54538a728d5be3a8d90140c (patch) | |
tree | e1a3e67224f7b5a6dd56db8b75591a9e38d64071 /tests/testlockbutton.c | |
parent | 93eec3e52f31f958ca7790e0eaa002e6975c4b57 (diff) | |
download | gtk+-e7470be7bf2d59b5e54538a728d5be3a8d90140c.tar.gz |
tests: Port testlockbutton to GTask
Get rid of deprecations that way.
Diffstat (limited to 'tests/testlockbutton.c')
-rw-r--r-- | tests/testlockbutton.c | 24 |
1 files 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); } |