diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-05-13 21:29:38 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-05-13 21:40:23 +0800 |
commit | 53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23 (patch) | |
tree | f4cdd57586ad4bd1af4669a429af0938e8d6e845 /em-format | |
parent | 89777f0726a0127daddd593c8a28384204cb7aaf (diff) | |
download | gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.gz gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.zst gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.zip |
Use g_simple_async_result_set_check_cancellable().
Always call it immediately after g_simple_async_result_new().
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/em-format.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/em-format/em-format.c b/em-format/em-format.c index 6b08705d86..23b2fd6ba8 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -1996,7 +1996,7 @@ em_format_parse_async (EMFormat *emf, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; + GSimpleAsyncResult *simple; g_return_if_fail (EM_IS_FORMAT (emf)); @@ -2023,10 +2023,15 @@ em_format_parse_async (EMFormat *emf, } - result = g_simple_async_result_new (G_OBJECT (emf), callback, - user_data, em_format_parse_async); - g_simple_async_result_run_in_thread (result, emf_start_async_parser, - G_PRIORITY_DEFAULT, cancellable); + simple = g_simple_async_result_new ( + G_OBJECT (emf), callback, + user_data, em_format_parse_async); + + g_simple_async_result_set_check_cancellable (simple, cancellable); + + g_simple_async_result_run_in_thread ( + simple, emf_start_async_parser, + G_PRIORITY_DEFAULT, cancellable); } void |