From a98c07a569292fa66f91d3fa4bd32f32adff1880 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 18 Sep 2010 15:57:27 -0400 Subject: Add a GCancellable to EActivity. EActivity now uses a GCancellable to manage cancellations, instead of having its own redundant cancellation API. API changes are as follows: + e_activity_get_cancellable() + e_activity_set_cancellable() - e_activity_cancel() - e_activity_is_cancelled() - e_activity_get_allow_cancel() - e_activity_set_allow_cancel() EActivity's "cancelled" signal remains, but only as a repeater for GCancellable::cancelled signals. It should not be emitted directly. The presence of a GCancellable implies that cancellation is allowed. EActivity does not create its own default GCancellable, it has to be given one. If a CamelOperation (cast as a GCancellable) is given, EActivity will configure itself to listen for status updates from the CamelOperation and propagate the information to its own "primary-text" and "percent" properties. These changes allowed me to start cleaning up some of the incredibly convoluted logic in mail-mt.c -- in particular, mail_operation_status() is completely gone now. mail-mt.c is still in a transitional state -- much more significant changes coming soon. --- addressbook/gui/widgets/e-addressbook-view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index bb6e58f7b6..957d85e30f 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1082,8 +1082,9 @@ status_message (EAddressbookView *view, } } else if (activity == NULL) { - activity = e_activity_new (status); + activity = e_activity_new (); view->priv->activity = activity; + e_activity_set_primary_text (activity, status); e_shell_backend_add_activity (shell_backend, activity); } else -- cgit