From 53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 13 May 2012 09:29:38 -0400 Subject: Use g_simple_async_result_set_check_cancellable(). Always call it immediately after g_simple_async_result_new(). --- addressbook/gui/widgets/eab-contact-formatter.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'addressbook') diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c index 57ce415d35..c436ea8e12 100644 --- a/addressbook/gui/widgets/eab-contact-formatter.c +++ b/addressbook/gui/widgets/eab-contact-formatter.c @@ -1237,7 +1237,7 @@ eab_contact_formatter_format_contact_async (EABContactFormatter *formatter, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; + GSimpleAsyncResult *simple; g_return_if_fail (EAB_IS_CONTACT_FORMATTER (formatter)); g_return_if_fail (E_IS_CONTACT (contact)); @@ -1249,13 +1249,14 @@ eab_contact_formatter_format_contact_async (EABContactFormatter *formatter, formatter->priv->contact = contact; - result = g_simple_async_result_new ( - G_OBJECT (formatter), - callback, user_data, - eab_contact_formatter_format_contact_async); + simple = g_simple_async_result_new ( + G_OBJECT (formatter), callback, user_data, + eab_contact_formatter_format_contact_async); + + g_simple_async_result_set_check_cancellable (simple, cancellable); g_simple_async_result_run_in_thread ( - result, do_start_async_formatter, + simple, do_start_async_formatter, G_PRIORITY_DEFAULT, cancellable); } -- cgit v1.2.3