aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-05-13 21:29:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-05-13 21:40:23 +0800
commit53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23 (patch)
treef4cdd57586ad4bd1af4669a429af0938e8d6e845 /addressbook
parent89777f0726a0127daddd593c8a28384204cb7aaf (diff)
downloadgsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar
gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.gz
gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.bz2
gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.lz
gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.xz
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 'addressbook')
-rw-r--r--addressbook/gui/widgets/eab-contact-formatter.c13
1 files changed, 7 insertions, 6 deletions
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);
}