diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-22 04:21:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-23 02:21:22 +0800 |
commit | c881b5bc5e61d04b18d4ab46ad70533e7340d15b (patch) | |
tree | e70a3ed0d2f93dacfe20d856de4d29578beb2e50 /mail/mail-mt.h | |
parent | f0714755e2fa8b06425907c2cf189abd3a1b7119 (diff) | |
download | gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.gz gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.zst gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.zip |
Simplify EActivity.
With unintrusive error dialogs gone, we can cut some unnecessary bits
out of EActivity.
I'm also adding a new enum property called "state", which is one of:
E_ACTIVITY_RUNNING
E_ACTIVITY_WAITING
E_ACTIVITY_CANCELLED
E_ACTIVITY_COMPLETED
The state of an activity must be explicitly changed. In particular,
when the user cancels an activity the state should be set only after
confirming the operation has been cancelled and not when cancellation
is requested (e.g. after receiving a G_IO_ERROR_CANCELLED, not when
the GCancellable emits "cancelled"). EActivityBar and EActivityProxy
widgets have been updated to make this distinction clearer in the UI.
E_ACTIVITY_WAITING will be used when activities have to be queued and
dispatched in sequence, which I haven't written yet.
Diffstat (limited to 'mail/mail-mt.h')
-rw-r--r-- | mail/mail-mt.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mail/mail-mt.h b/mail/mail-mt.h index 122519162b..0b595072b6 100644 --- a/mail/mail-mt.h +++ b/mail/mail-mt.h @@ -24,25 +24,26 @@ #define _MAIL_MT #include <camel/camel.h> +#include <e-util/e-activity.h> typedef struct _MailMsg MailMsg; typedef struct _MailMsgInfo MailMsgInfo; -typedef struct _MailMsgPrivate MailMsgPrivate; -typedef gchar * (*MailMsgDescFunc) (MailMsg *msg); -typedef void (*MailMsgExecFunc) (MailMsg *msg); -typedef void (*MailMsgDoneFunc) (MailMsg *msg); -typedef void (*MailMsgFreeFunc) (MailMsg *msg); -typedef void (*MailMsgDispatchFunc) (gpointer msg); +typedef gchar * (*MailMsgDescFunc) (MailMsg *msg); +typedef void (*MailMsgExecFunc) (MailMsg *msg, + GCancellable *cancellable, + GError **error); +typedef void (*MailMsgDoneFunc) (MailMsg *msg); +typedef void (*MailMsgFreeFunc) (MailMsg *msg); +typedef void (*MailMsgDispatchFunc) (gpointer msg); struct _MailMsg { MailMsgInfo *info; volatile gint ref_count; guint seq; /* seq number for synchronisation */ gint priority; /* priority (default = 0) */ - GCancellable *cancellable; /* a cancellation/status handle */ + EActivity *activity; GError *error; /* up to the caller to use this */ - MailMsgPrivate *priv; }; struct _MailMsgInfo { |