diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-29 01:30:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-29 01:30:32 +0800 |
commit | 5e82bdba14fba81603f3879a46b46a011db7d2e4 (patch) | |
tree | 0a4a475e33b4fbdf4a96249afa777b82903843f6 /calendar/modules | |
parent | 17e030e2022b2343c795b7fd524ba9451ca71e9f (diff) | |
download | gsoc2013-evolution-5e82bdba14fba81603f3879a46b46a011db7d2e4.tar gsoc2013-evolution-5e82bdba14fba81603f3879a46b46a011db7d2e4.tar.gz gsoc2013-evolution-5e82bdba14fba81603f3879a46b46a011db7d2e4.tar.bz2 gsoc2013-evolution-5e82bdba14fba81603f3879a46b46a011db7d2e4.tar.lz gsoc2013-evolution-5e82bdba14fba81603f3879a46b46a011db7d2e4.tar.xz gsoc2013-evolution-5e82bdba14fba81603f3879a46b46a011db7d2e4.tar.zst gsoc2013-evolution-5e82bdba14fba81603f3879a46b46a011db7d2e4.zip |
Wire up status messages to include percentages if available.
svn path=/branches/kill-bonobo/; revision=36692
Diffstat (limited to 'calendar/modules')
-rw-r--r-- | calendar/modules/e-cal-shell-content.c | 2 | ||||
-rw-r--r-- | calendar/modules/e-cal-shell-sidebar.c | 2 | ||||
-rw-r--r-- | calendar/modules/e-cal-shell-view-memopad.c | 44 | ||||
-rw-r--r-- | calendar/modules/e-cal-shell-view-private.c | 61 | ||||
-rw-r--r-- | calendar/modules/e-cal-shell-view-private.h | 15 | ||||
-rw-r--r-- | calendar/modules/e-cal-shell-view-taskpad.c | 44 | ||||
-rw-r--r-- | calendar/modules/e-cal-shell-view.c | 1 | ||||
-rw-r--r-- | calendar/modules/e-memo-shell-sidebar.c | 10 | ||||
-rw-r--r-- | calendar/modules/e-memo-shell-sidebar.h | 3 | ||||
-rw-r--r-- | calendar/modules/e-memo-shell-view-actions.c | 7 | ||||
-rw-r--r-- | calendar/modules/e-memo-shell-view-private.c | 8 | ||||
-rw-r--r-- | calendar/modules/e-memo-shell-view-private.h | 3 | ||||
-rw-r--r-- | calendar/modules/e-task-shell-sidebar.c | 10 | ||||
-rw-r--r-- | calendar/modules/e-task-shell-sidebar.h | 3 | ||||
-rw-r--r-- | calendar/modules/e-task-shell-view-actions.c | 7 | ||||
-rw-r--r-- | calendar/modules/e-task-shell-view-private.c | 8 | ||||
-rw-r--r-- | calendar/modules/e-task-shell-view-private.h | 3 |
17 files changed, 187 insertions, 44 deletions
diff --git a/calendar/modules/e-cal-shell-content.c b/calendar/modules/e-cal-shell-content.c index 879420a307..f8bd9f6ddd 100644 --- a/calendar/modules/e-cal-shell-content.c +++ b/calendar/modules/e-cal-shell-content.c @@ -62,6 +62,8 @@ struct _ECalShellContentPrivate { EMemoTableConfig *memo_table_config; GalViewInstance *view_instance; + + guint paned_binding_id; }; enum { diff --git a/calendar/modules/e-cal-shell-sidebar.c b/calendar/modules/e-cal-shell-sidebar.c index 7f962574f4..7c2777bf04 100644 --- a/calendar/modules/e-cal-shell-sidebar.c +++ b/calendar/modules/e-cal-shell-sidebar.c @@ -421,7 +421,7 @@ cal_shell_sidebar_constructed (GObject *object) /* Restore the selector state from the last session. */ selector = E_SOURCE_SELECTOR (priv->selector); - model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); + model = gtk_tree_view_get_model (GTK_TREE_VIEW (selector)); g_signal_connect_swapped ( model, "row-changed", diff --git a/calendar/modules/e-cal-shell-view-memopad.c b/calendar/modules/e-cal-shell-view-memopad.c index ff9c235062..5c2bf19052 100644 --- a/calendar/modules/e-cal-shell-view-memopad.c +++ b/calendar/modules/e-cal-shell-view-memopad.c @@ -68,15 +68,15 @@ action_calendar_memopad_delete_cb (GtkAction *action, { ECalShellContent *cal_shell_content; EMemoTable *memo_table; - const gchar *status_message; cal_shell_content = cal_shell_view->priv->cal_shell_content; memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - status_message = _("Deleting selected memos..."); - e_cal_shell_view_set_status_message (cal_shell_view, status_message); + e_cal_shell_view_memopad_set_status_message ( + cal_shell_view, _("Deleting selected memos..."), -1.0); e_memo_table_delete_selected (memo_table); - e_cal_shell_view_set_status_message (cal_shell_view, NULL); + e_cal_shell_view_memopad_set_status_message ( + cal_shell_view, NULL, -1.0); } static void @@ -470,3 +470,39 @@ e_cal_shell_view_memopad_open_memo (ECalShellView *cal_shell_view, exit: gtk_window_present (GTK_WINDOW (editor)); } + +void +e_cal_shell_view_memopad_set_status_message (ECalShellView *cal_shell_view, + const gchar *status_message, + gdouble percent) +{ + EActivity *activity; + EShellView *shell_view; + EShellModule *shell_module; + + g_return_if_fail (E_IS_CAL_SHELL_VIEW (cal_shell_view)); + + shell_view = E_SHELL_VIEW (cal_shell_view); + shell_module = e_shell_view_get_shell_module (shell_view); + + activity = cal_shell_view->priv->memopad_activity; + + if (status_message == NULL || *status_message == '\0') { + if (activity != NULL) { + e_activity_complete (activity); + g_object_unref (activity); + activity = NULL; + } + + } else if (activity == NULL) { + activity = e_activity_new (status_message); + e_activity_set_percent (activity, percent); + e_shell_module_add_activity (shell_module, activity); + + } else { + e_activity_set_percent (activity, percent); + e_activity_set_primary_text (activity, status_message); + } + + cal_shell_view->priv->memopad_activity = activity; +} diff --git a/calendar/modules/e-cal-shell-view-private.c b/calendar/modules/e-cal-shell-view-private.c index 72b25f0e8d..3b7bea2449 100644 --- a/calendar/modules/e-cal-shell-view-private.c +++ b/calendar/modules/e-cal-shell-view-private.c @@ -225,6 +225,8 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) EShellView *shell_view; GnomeCalendar *calendar; ECalendar *mini_calendar; + EMemoTable *memo_table; + ECalendarTable *task_table; guint notification; shell_view = E_SHELL_VIEW (cal_shell_view); @@ -237,6 +239,8 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) cal_shell_content = E_CAL_SHELL_CONTENT (shell_content); calendar = e_cal_shell_content_get_calendar (cal_shell_content); + memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); + task_table = e_cal_shell_content_get_task_table (cal_shell_content); cal_shell_sidebar = E_CAL_SHELL_SIDEBAR (shell_sidebar); mini_calendar = e_cal_shell_sidebar_get_mini_calendar (cal_shell_sidebar); @@ -265,6 +269,26 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) G_CALLBACK (cal_shell_view_mini_calendar_selection_changed_cb), cal_shell_view); + g_signal_connect_swapped ( + memo_table, "status-message", + G_CALLBACK (e_cal_shell_view_memopad_set_status_message), + cal_shell_view); + + g_signal_connect_swapped ( + task_table, "status-message", + G_CALLBACK (e_cal_shell_view_taskpad_set_status_message), + cal_shell_view); + + g_signal_connect_swapped ( + e_memo_table_get_table (memo_table), "selection-change", + G_CALLBACK (e_cal_shell_view_memopad_actions_update), + cal_shell_view); + + g_signal_connect_swapped ( + e_calendar_table_get_table (task_table), "selection-change", + G_CALLBACK (e_cal_shell_view_taskpad_actions_update), + cal_shell_view); + /* Listen for configuration changes. */ #if 0 @@ -279,7 +303,7 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) G_CALLBACK (e_cal_shell_view_update_search_filter), cal_shell_view); - e_cal_shell_view_actions_init (shell_view); + e_cal_shell_view_actions_init (cal_shell_view); e_cal_shell_view_update_sidebar (cal_shell_view); e_cal_shell_view_update_search_filter (cal_shell_view); } @@ -297,11 +321,25 @@ e_cal_shell_view_private_dispose (ECalShellView *cal_shell_view) DISPOSE (priv->cal_shell_content); DISPOSE (priv->cal_shell_sidebar); - if (cal_shell_view->priv->activity != NULL) { + if (cal_shell_view->priv->calendar_activity != NULL) { + /* XXX Activity is not cancellable. */ + e_activity_complete (cal_shell_view->priv->calendar_activity); + g_object_unref (cal_shell_view->priv->calendar_activity); + cal_shell_view->priv->calendar_activity = NULL; + } + + if (cal_shell_view->priv->memopad_activity != NULL) { /* XXX Activity is not cancellable. */ - e_activity_complete (cal_shell_view->priv->activity); - g_object_unref (cal_shell_view->priv->activity); - cal_shell_view->priv->activity = NULL; + e_activity_complete (cal_shell_view->priv->memopad_activity); + g_object_unref (cal_shell_view->priv->memopad_activity); + cal_shell_view->priv->memopad_activity = NULL; + } + + if (cal_shell_view->priv->taskpad_activity != NULL) { + /* XXX Activity is not cancellable. */ + e_activity_complete (cal_shell_view->priv->taskpad_activity); + g_object_unref (cal_shell_view->priv->taskpad_activity); + cal_shell_view->priv->taskpad_activity = NULL; } } @@ -360,7 +398,8 @@ exit: void e_cal_shell_view_set_status_message (ECalShellView *cal_shell_view, - const gchar *status_message) + const gchar *status_message, + gdouble percent) { EActivity *activity; EShellView *shell_view; @@ -368,10 +407,11 @@ e_cal_shell_view_set_status_message (ECalShellView *cal_shell_view, g_return_if_fail (E_IS_CAL_SHELL_VIEW (cal_shell_view)); - activity = cal_shell_view->priv->activity; shell_view = E_SHELL_VIEW (cal_shell_view); shell_module = e_shell_view_get_shell_module (shell_view); + activity = cal_shell_view->priv->calendar_activity; + if (status_message == NULL || *status_message == '\0') { if (activity != NULL) { e_activity_complete (activity); @@ -381,12 +421,15 @@ e_cal_shell_view_set_status_message (ECalShellView *cal_shell_view, } else if (activity == NULL) { activity = e_activity_new (status_message); + e_activity_set_percent (activity, percent); e_shell_module_add_activity (shell_module, activity); - } else + } else { + e_activity_set_percent (activity, percent); e_activity_set_primary_text (activity, status_message); + } - cal_shell_view->priv->activity = activity; + cal_shell_view->priv->calendar_activity = activity; } void diff --git a/calendar/modules/e-cal-shell-view-private.h b/calendar/modules/e-cal-shell-view-private.h index 6187e2b749..f1116f9c35 100644 --- a/calendar/modules/e-cal-shell-view-private.h +++ b/calendar/modules/e-cal-shell-view-private.h @@ -104,7 +104,9 @@ struct _ECalShellViewPrivate { /* The last time explicitly selected by the user. */ time_t base_view_time; - EActivity *activity; + EActivity *calendar_activity; + EActivity *memopad_activity; + EActivity *taskpad_activity; }; void e_cal_shell_view_private_init @@ -128,7 +130,8 @@ void e_cal_shell_view_open_event ECalModelComponent *comp_data); void e_cal_shell_view_set_status_message (ECalShellView *cal_shell_view, - const gchar *status_message); + const gchar *status_message, + gdouble percent); void e_cal_shell_view_update_sidebar (ECalShellView *cal_shell_view); void e_cal_shell_view_update_search_filter @@ -143,6 +146,10 @@ void e_cal_shell_view_memopad_actions_update void e_cal_shell_view_memopad_open_memo (ECalShellView *cal_shell_view, ECalModelComponent *comp_data); +void e_cal_shell_view_memopad_set_status_message + (ECalShellView *cal_shell_view, + const gchar *status_message, + gdouble percent); /* Task Pad Utilities */ @@ -153,6 +160,10 @@ void e_cal_shell_view_taskpad_actions_update void e_cal_shell_view_taskpad_open_task (ECalShellView *cal_shell_view, ECalModelComponent *comp_data); +void e_cal_shell_view_taskpad_set_status_message + (ECalShellView *cal_shell_view, + const gchar *status_message, + gdouble percent); G_END_DECLS diff --git a/calendar/modules/e-cal-shell-view-taskpad.c b/calendar/modules/e-cal-shell-view-taskpad.c index e2cc9d9a52..aa3a73cbab 100644 --- a/calendar/modules/e-cal-shell-view-taskpad.c +++ b/calendar/modules/e-cal-shell-view-taskpad.c @@ -91,15 +91,15 @@ action_calendar_taskpad_delete_cb (GtkAction *action, { ECalShellContent *cal_shell_content; ECalendarTable *task_table; - const gchar *status_message; cal_shell_content = cal_shell_view->priv->cal_shell_content; task_table = e_cal_shell_content_get_task_table (cal_shell_content); - status_message = _("Deleting selected tasks..."); - e_cal_shell_view_set_status_message (cal_shell_view, status_message); + e_cal_shell_view_taskpad_set_status_message ( + cal_shell_view, _("Deleting selected tasks..."), -1.0); e_calendar_table_delete_selected (task_table); - e_cal_shell_view_set_status_message (cal_shell_view, NULL); + e_cal_shell_view_taskpad_set_status_message ( + cal_shell_view, NULL, -1.0); } static void @@ -598,3 +598,39 @@ e_cal_shell_view_taskpad_open_task (ECalShellView *cal_shell_view, exit: gtk_window_present (GTK_WINDOW (editor)); } + +void +e_cal_shell_view_taskpad_set_status_message (ECalShellView *cal_shell_view, + const gchar *status_message, + gdouble percent) +{ + EActivity *activity; + EShellView *shell_view; + EShellModule *shell_module; + + g_return_if_fail (E_IS_CAL_SHELL_VIEW (cal_shell_view)); + + shell_view = E_SHELL_VIEW (cal_shell_view); + shell_module = e_shell_view_get_shell_module (shell_view); + + activity = cal_shell_view->priv->taskpad_activity; + + if (status_message == NULL || *status_message == '\0') { + if (activity != NULL) { + e_activity_complete (activity); + g_object_unref (activity); + activity = NULL; + } + + } else if (activity == NULL) { + activity = e_activity_new (status_message); + e_activity_set_percent (activity, percent); + e_shell_module_add_activity (shell_module, activity); + + } else { + e_activity_set_percent (activity, percent); + e_activity_set_primary_text (activity, status_message); + } + + cal_shell_view->priv->taskpad_activity = activity; +} diff --git a/calendar/modules/e-cal-shell-view.c b/calendar/modules/e-cal-shell-view.c index 9100986280..fa2142e42a 100644 --- a/calendar/modules/e-cal-shell-view.c +++ b/calendar/modules/e-cal-shell-view.c @@ -193,6 +193,7 @@ cal_shell_view_class_init (ECalShellViewClass *class, shell_view_class->search_options = "/calendar-search-options"; shell_view_class->search_rules = "caltypes.xml"; shell_view_class->type_module = type_module; + shell_view_class->new_shell_content = e_cal_shell_content_new; shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new; shell_view_class->update_actions = cal_shell_view_update_actions; diff --git a/calendar/modules/e-memo-shell-sidebar.c b/calendar/modules/e-memo-shell-sidebar.c index 6e5475e290..9068397005 100644 --- a/calendar/modules/e-memo-shell-sidebar.c +++ b/calendar/modules/e-memo-shell-sidebar.c @@ -26,6 +26,7 @@ #include <libecal/e-cal.h> #include "e-util/e-error.h" +#include "e-util/e-util.h" #include "calendar/common/authentication.h" #include "calendar/gui/calendar-config.h" #include "calendar/gui/e-calendar-selector.h" @@ -83,7 +84,7 @@ memo_shell_sidebar_emit_status_message (EMemoShellSidebar *memo_shell_sidebar, { guint signal_id = signals[STATUS_MESSAGE]; - g_signal_emit (memo_shell_sidebar, signal_id, 0, status_message); + g_signal_emit (memo_shell_sidebar, signal_id, 0, status_message, -1.0); } static void @@ -558,9 +559,10 @@ memo_shell_sidebar_class_init (EMemoShellSidebarClass *class) G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (EMemoShellSidebarClass, status_message), NULL, NULL, - g_cclosure_marshal_VOID__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + e_marshal_VOID__STRING_DOUBLE, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_DOUBLE); } static void diff --git a/calendar/modules/e-memo-shell-sidebar.h b/calendar/modules/e-memo-shell-sidebar.h index 8e59c5b38e..50ece794b2 100644 --- a/calendar/modules/e-memo-shell-sidebar.h +++ b/calendar/modules/e-memo-shell-sidebar.h @@ -72,7 +72,8 @@ struct _EMemoShellSidebarClass { void (*client_removed) (EMemoShellSidebar *memo_shell_sidebar, ECal *client); void (*status_message) (EMemoShellSidebar *memo_shell_sidebar, - const gchar *status_message); + const gchar *status_message, + gdouble percent); }; GType e_memo_shell_sidebar_get_type (void); diff --git a/calendar/modules/e-memo-shell-view-actions.c b/calendar/modules/e-memo-shell-view-actions.c index d6e9387e31..915f52640e 100644 --- a/calendar/modules/e-memo-shell-view-actions.c +++ b/calendar/modules/e-memo-shell-view-actions.c @@ -87,16 +87,15 @@ action_memo_delete_cb (GtkAction *action, EMemoShellContent *memo_shell_content; ECalComponentPreview *memo_preview; EMemoTable *memo_table; - const gchar *status_message; memo_shell_content = memo_shell_view->priv->memo_shell_content; memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content); - status_message = _("Deleting selected memos..."); - e_memo_shell_view_set_status_message (memo_shell_view, status_message); + e_memo_shell_view_set_status_message ( + memo_shell_view, _("Deleting selected memos..."), -1.0); e_memo_table_delete_selected (memo_table); - e_memo_shell_view_set_status_message (memo_shell_view, NULL); + e_memo_shell_view_set_status_message (memo_shell_view, NULL, -1.0); e_cal_component_preview_clear (memo_preview); } diff --git a/calendar/modules/e-memo-shell-view-private.c b/calendar/modules/e-memo-shell-view-private.c index 183d48a5b0..10b20c1827 100644 --- a/calendar/modules/e-memo-shell-view-private.c +++ b/calendar/modules/e-memo-shell-view-private.c @@ -450,7 +450,8 @@ exit: void e_memo_shell_view_set_status_message (EMemoShellView *memo_shell_view, - const gchar *status_message) + const gchar *status_message, + gdouble percent) { EActivity *activity; EShellView *shell_view; @@ -471,10 +472,13 @@ e_memo_shell_view_set_status_message (EMemoShellView *memo_shell_view, } else if (activity == NULL) { activity = e_activity_new (status_message); + e_activity_set_percent (activity, percent); e_shell_module_add_activity (shell_module, activity); - } else + } else { + e_activity_set_percent (activity, percent); e_activity_set_primary_text (activity, status_message); + } memo_shell_view->priv->activity = activity; } diff --git a/calendar/modules/e-memo-shell-view-private.h b/calendar/modules/e-memo-shell-view-private.h index 0a68ef1f98..66d9665c48 100644 --- a/calendar/modules/e-memo-shell-view-private.h +++ b/calendar/modules/e-memo-shell-view-private.h @@ -122,7 +122,8 @@ void e_memo_shell_view_open_memo ECalModelComponent *comp_data); void e_memo_shell_view_set_status_message (EMemoShellView *memo_shell_view, - const gchar *status_message); + const gchar *status_message, + gdouble percent); void e_memo_shell_view_update_sidebar (EMemoShellView *memo_shell_view); void e_memo_shell_view_update_search_filter diff --git a/calendar/modules/e-task-shell-sidebar.c b/calendar/modules/e-task-shell-sidebar.c index 913d18e37f..f58df26dfc 100644 --- a/calendar/modules/e-task-shell-sidebar.c +++ b/calendar/modules/e-task-shell-sidebar.c @@ -26,6 +26,7 @@ #include <libecal/e-cal.h> #include "e-util/e-error.h" +#include "e-util/e-util.h" #include "calendar/common/authentication.h" #include "calendar/gui/calendar-config.h" #include "calendar/gui/e-calendar-selector.h" @@ -83,7 +84,7 @@ task_shell_sidebar_emit_status_message (ETaskShellSidebar *task_shell_sidebar, { guint signal_id = signals[STATUS_MESSAGE]; - g_signal_emit (task_shell_sidebar, signal_id, 0, status_message); + g_signal_emit (task_shell_sidebar, signal_id, 0, status_message, -1.0); } static void @@ -558,9 +559,10 @@ task_shell_sidebar_class_init (ETaskShellSidebarClass *class) G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (ETaskShellSidebarClass, status_message), NULL, NULL, - g_cclosure_marshal_VOID__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + e_marshal_VOID__STRING_DOUBLE, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_DOUBLE); } static void diff --git a/calendar/modules/e-task-shell-sidebar.h b/calendar/modules/e-task-shell-sidebar.h index 8fcafcaa98..57f12d3738 100644 --- a/calendar/modules/e-task-shell-sidebar.h +++ b/calendar/modules/e-task-shell-sidebar.h @@ -72,7 +72,8 @@ struct _ETaskShellSidebarClass { void (*client_removed) (ETaskShellSidebar *task_shell_sidebar, ECal *client); void (*status_message) (ETaskShellSidebar *task_shell_sidebar, - const gchar *status_message); + const gchar *status_message, + gdouble percent); }; GType e_task_shell_sidebar_get_type (void); diff --git a/calendar/modules/e-task-shell-view-actions.c b/calendar/modules/e-task-shell-view-actions.c index 9a5bca34d9..45c1400c40 100644 --- a/calendar/modules/e-task-shell-view-actions.c +++ b/calendar/modules/e-task-shell-view-actions.c @@ -134,16 +134,15 @@ action_task_delete_cb (GtkAction *action, ETaskShellContent *task_shell_content; ECalComponentPreview *task_preview; ECalendarTable *task_table; - const gchar *status_message; task_shell_content = task_shell_view->priv->task_shell_content; task_table = e_task_shell_content_get_task_table (task_shell_content); task_preview = e_task_shell_content_get_task_preview (task_shell_content); - status_message = _("Deleting selected tasks..."); - e_task_shell_view_set_status_message (task_shell_view, status_message); + e_task_shell_view_set_status_message ( + task_shell_view, _("Deleting selected tasks..."), -1.0); e_calendar_table_delete_selected (task_table); - e_task_shell_view_set_status_message (task_shell_view, NULL); + e_task_shell_view_set_status_message (task_shell_view, NULL, -1.0); e_cal_component_preview_clear (task_preview); } diff --git a/calendar/modules/e-task-shell-view-private.c b/calendar/modules/e-task-shell-view-private.c index 754f6fe4c6..ef2b641ff3 100644 --- a/calendar/modules/e-task-shell-view-private.c +++ b/calendar/modules/e-task-shell-view-private.c @@ -521,7 +521,8 @@ exit: void e_task_shell_view_set_status_message (ETaskShellView *task_shell_view, - const gchar *status_message) + const gchar *status_message, + gdouble percent) { EActivity *activity; EShellView *shell_view; @@ -542,10 +543,13 @@ e_task_shell_view_set_status_message (ETaskShellView *task_shell_view, } else if (activity == NULL) { activity = e_activity_new (status_message); + e_activity_set_percent (activity, percent); e_shell_module_add_activity (shell_module, activity); - } else + } else { + e_activity_set_percent (activity, percent); e_activity_set_primary_text (activity, status_message); + } task_shell_view->priv->activity = activity; } diff --git a/calendar/modules/e-task-shell-view-private.h b/calendar/modules/e-task-shell-view-private.h index dfb5c98d10..ba6e076c12 100644 --- a/calendar/modules/e-task-shell-view-private.h +++ b/calendar/modules/e-task-shell-view-private.h @@ -131,7 +131,8 @@ void e_task_shell_view_open_task ECalModelComponent *comp_data); void e_task_shell_view_set_status_message (ETaskShellView *task_shell_view, - const gchar *status_message); + const gchar *status_message, + gdouble percent); void e_task_shell_view_update_sidebar (ETaskShellView *task_shell_view); void e_task_shell_view_update_search_filter |