aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-memo-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-22 04:21:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-23 02:21:22 +0800
commitc881b5bc5e61d04b18d4ab46ad70533e7340d15b (patch)
treee70a3ed0d2f93dacfe20d856de4d29578beb2e50 /modules/calendar/e-memo-shell-view-private.c
parentf0714755e2fa8b06425907c2cf189abd3a1b7119 (diff)
downloadgsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar
gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.gz
gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.bz2
gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.lz
gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.xz
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 'modules/calendar/e-memo-shell-view-private.c')
-rw-r--r--modules/calendar/e-memo-shell-view-private.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index 8c83619564..4fe6a259e2 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -296,7 +296,9 @@ e_memo_shell_view_private_dispose (EMemoShellView *memo_shell_view)
if (memo_shell_view->priv->activity != NULL) {
/* XXX Activity is not cancellable. */
- e_activity_complete (memo_shell_view->priv->activity);
+ e_activity_set_state (
+ memo_shell_view->priv->activity,
+ E_ACTIVITY_COMPLETED);
g_object_unref (memo_shell_view->priv->activity);
memo_shell_view->priv->activity = NULL;
}
@@ -370,7 +372,7 @@ e_memo_shell_view_set_status_message (EMemoShellView *memo_shell_view,
if (status_message == NULL || *status_message == '\0') {
if (activity != NULL) {
- e_activity_complete (activity);
+ e_activity_set_state (activity, E_ACTIVITY_COMPLETED);
g_object_unref (activity);
activity = NULL;
}
@@ -378,12 +380,12 @@ e_memo_shell_view_set_status_message (EMemoShellView *memo_shell_view,
} else if (activity == NULL) {
activity = e_activity_new ();
e_activity_set_percent (activity, percent);
- e_activity_set_primary_text (activity, status_message);
+ e_activity_set_text (activity, status_message);
e_shell_backend_add_activity (shell_backend, activity);
} else {
e_activity_set_percent (activity, percent);
- e_activity_set_primary_text (activity, status_message);
+ e_activity_set_text (activity, status_message);
}
memo_shell_view->priv->activity = activity;