forked from AuroraMiddleware/gtk
tests: Port testlockbutton to GTask
Get rid of deprecations that way.
This commit is contained in:
parent
93eec3e52f
commit
e7470be7bf
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user