aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-tasks.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-07-02 22:54:44 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-07-02 22:54:44 +0800
commitcb9a6f71878dc639b0711d97ec3bc8e16d4ffcf6 (patch)
treee583bf6e4342672df9191e9869ad7e812da7ed22 /calendar/gui/e-tasks.c
parent10315aabac9f3cab20fc54527af82b06b8588ff9 (diff)
downloadgsoc2013-evolution-cb9a6f71878dc639b0711d97ec3bc8e16d4ffcf6.tar.gz
gsoc2013-evolution-cb9a6f71878dc639b0711d97ec3bc8e16d4ffcf6.tar.zst
gsoc2013-evolution-cb9a6f71878dc639b0711d97ec3bc8e16d4ffcf6.zip
show the progress indication in the view while downloading calendar items
from EDS svn path=/trunk/; revision=29618
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r--calendar/gui/e-tasks.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 22d94983ac..00b6212124 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -330,6 +330,21 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer data)
}
static void
+view_progress_cb (ECalModel *model, const char *message, int percent, ECalSourceType type, ETasks *tasks)
+{
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
+ message, percent);
+}
+
+static void
+view_done_cb (ECalModel *model, ECalendarStatus status, ECalSourceType type, ETasks *tasks)
+{
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
+ NULL, -1);
+
+}
+
+static void
setup_config (ETasks *tasks)
{
ETasksPrivate *priv;
@@ -540,6 +555,11 @@ setup_widgets (ETasks *tasks)
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
g_signal_connect (G_OBJECT (model), "model_row_changed",
G_CALLBACK (model_row_changed_cb), tasks);
+
+ g_signal_connect (G_OBJECT (model), "cal_view_progress",
+ G_CALLBACK (view_progress_cb), tasks);
+ g_signal_connect (G_OBJECT (model), "cal_view_done",
+ G_CALLBACK (view_done_cb), tasks);
}
/* Class initialization function for the gnome calendar */
@@ -744,7 +764,7 @@ set_status_message (ETasks *tasks, const char *message, ...)
priv = tasks->priv;
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), msg_string);
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), msg_string, -1);
}
/* Callback from the calendar client when an error occurs in the backend */
@@ -784,7 +804,7 @@ backend_died_cb (ECal *client, gpointer data)
gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source);
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)), NULL);
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)), NULL, -1);
e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))),
"calendar:tasks-crashed", NULL);