aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-activity.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-19 03:57:27 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-19 04:40:19 +0800
commita98c07a569292fa66f91d3fa4bd32f32adff1880 (patch)
tree98caa43594f61662289fd696b409978946e92255 /e-util/e-activity.h
parentb145c0a2522c5c9942c0827bf03baefea68f5d99 (diff)
downloadgsoc2013-evolution-a98c07a569292fa66f91d3fa4bd32f32adff1880.tar.gz
gsoc2013-evolution-a98c07a569292fa66f91d3fa4bd32f32adff1880.tar.zst
gsoc2013-evolution-a98c07a569292fa66f91d3fa4bd32f32adff1880.zip
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.
Diffstat (limited to 'e-util/e-activity.h')
-rw-r--r--e-util/e-activity.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/e-util/e-activity.h b/e-util/e-activity.h
index b396e3a630..4573fada57 100644
--- a/e-util/e-activity.h
+++ b/e-util/e-activity.h
@@ -65,18 +65,16 @@ struct _EActivityClass {
};
GType e_activity_get_type (void);
-EActivity * e_activity_new (const gchar *primary_text);
+EActivity * e_activity_new (void);
EActivity * e_activity_newv (const gchar *format,
...) G_GNUC_PRINTF (1, 2);
-void e_activity_cancel (EActivity *activity);
void e_activity_complete (EActivity *activity);
void e_activity_clicked (EActivity *activity);
gchar * e_activity_describe (EActivity *activity);
-gboolean e_activity_is_cancelled (EActivity *activity);
gboolean e_activity_is_completed (EActivity *activity);
-gboolean e_activity_get_allow_cancel (EActivity *activity);
-void e_activity_set_allow_cancel (EActivity *activity,
- gboolean allow_cancel);
+GCancellable * e_activity_get_cancellable (EActivity *activity);
+void e_activity_set_cancellable (EActivity *activity,
+ GCancellable *cancellable);
gboolean e_activity_get_clickable (EActivity *activity);
void e_activity_set_clickable (EActivity *activity,
gboolean clickable);