diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-file-request.c | 15 | ||||
-rw-r--r-- | e-util/e-file-utils.c | 2 | ||||
-rw-r--r-- | e-util/e-stock-request.c | 15 |
3 files changed, 22 insertions, 10 deletions
diff --git a/e-util/e-file-request.c b/e-util/e-file-request.c index 62c64e34a8..08d8682261 100644 --- a/e-util/e-file-request.c +++ b/e-util/e-file-request.c @@ -93,7 +93,7 @@ file_request_send_async (SoupRequest *request, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; + GSimpleAsyncResult *simple; d(printf("received request for %s\n", soup_uri_to_string (uri, FALSE))); @@ -102,10 +102,15 @@ file_request_send_async (SoupRequest *request, * which WebKit thinks it's remote, but in fact it behaves like * oridnary file:// */ - result = g_simple_async_result_new (G_OBJECT (request), callback, - user_data, file_request_send_async); - g_simple_async_result_run_in_thread (result, handle_file_request, - G_PRIORITY_DEFAULT, cancellable); + simple = g_simple_async_result_new ( + G_OBJECT (request), callback, user_data, + file_request_send_async); + + g_simple_async_result_set_check_cancellable (simple, cancellable); + + g_simple_async_result_run_in_thread ( + simple, handle_file_request, + G_PRIORITY_DEFAULT, cancellable); } static GInputStream * diff --git a/e-util/e-file-utils.c b/e-util/e-file-utils.c index ebb65f460e..90b2e77205 100644 --- a/e-util/e-file-utils.c +++ b/e-util/e-file-utils.c @@ -172,6 +172,8 @@ e_file_replace_contents_async (GFile *file, G_OBJECT (file), callback, user_data, e_file_replace_contents_async); + g_simple_async_result_set_check_cancellable (simple, cancellable); + g_simple_async_result_set_op_res_gpointer ( simple, context, (GDestroyNotify) async_context_free); diff --git a/e-util/e-stock-request.c b/e-util/e-stock-request.c index 2b805f471e..c9a2e5fc1b 100644 --- a/e-util/e-stock-request.c +++ b/e-util/e-stock-request.c @@ -180,14 +180,19 @@ stock_request_send_async (SoupRequest *request, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; + GSimpleAsyncResult *simple; d(printf("received request for %s\n", soup_uri_to_string (uri, FALSE))); - result = g_simple_async_result_new (G_OBJECT (request), callback, - user_data, stock_request_send_async); - g_simple_async_result_run_in_thread (result, handle_stock_request, - G_PRIORITY_DEFAULT, cancellable); + simple = g_simple_async_result_new ( + G_OBJECT (request), callback, user_data, + stock_request_send_async); + + g_simple_async_result_set_check_cancellable (simple, cancellable); + + g_simple_async_result_run_in_thread ( + simple, handle_stock_request, + G_PRIORITY_DEFAULT, cancellable); } static GInputStream * |