forked from sergiotarxz/mangareader
Adding g_task_set_return_on_cancel.
This commit is contained in:
parent
2c2e1d550e
commit
84c47861ad
@ -54,7 +54,6 @@ mg_util_soup_get_request (MgUtilSoup *self, const char *url, gsize *size_respons
|
|||||||
g_value_unset (&response);
|
g_value_unset (&response);
|
||||||
g_clear_object (&soup_session);
|
g_clear_object (&soup_session);
|
||||||
g_clear_object (&msg);
|
g_clear_object (&msg);
|
||||||
|
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ create_picture_from_url (const char *const url, gint picture_size,
|
|||||||
attrs->image = image;
|
attrs->image = image;
|
||||||
attrs->picture_size = picture_size;
|
attrs->picture_size = picture_size;
|
||||||
g_task_set_task_data (task, attrs, free_picture_thread_attributes);
|
g_task_set_task_data (task, attrs, free_picture_thread_attributes);
|
||||||
|
g_task_set_return_on_cancel (task, true);
|
||||||
g_task_run_in_thread (task, threaded_picture_recover);
|
g_task_run_in_thread (task, threaded_picture_recover);
|
||||||
}
|
}
|
||||||
cleanup_create_picture_from_url:
|
cleanup_create_picture_from_url:
|
||||||
|
Loading…
Reference in New Issue
Block a user