aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-task-table.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-12-14 21:48:34 +0800
committerMilan Crha <mcrha@redhat.com>2011-12-14 21:48:34 +0800
commit017f373b5284b4d7177c19e5ac2a142a5362a15c (patch)
treed180e617b7b080cf9a324154a5c49fdc2294b3d1 /calendar/gui/e-task-table.c
parent10ee75dfdfd41fc35e6307619e891915b6f3cafe (diff)
downloadgsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar
gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar.gz
gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar.bz2
gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar.lz
gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar.xz
gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.tar.zst
gsoc2013-evolution-017f373b5284b4d7177c19e5ac2a142a5362a15c.zip
Bug #582649 - Toggle for coloring today and overdue tasks
Diffstat (limited to 'calendar/gui/e-task-table.c')
-rw-r--r--calendar/gui/e-task-table.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index e052e82357..4efe8d0669 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -288,6 +288,16 @@ delete_selected_components (ETaskTable *task_table)
}
static void
+task_table_queue_draw_cb (ECalModelTasks *tasks_model,
+ GParamSpec *param,
+ GtkWidget *task_table)
+{
+ g_return_if_fail (task_table != NULL);
+
+ gtk_widget_queue_draw (task_table);
+}
+
+static void
task_table_set_model (ETaskTable *task_table,
ECalModel *model)
{
@@ -304,6 +314,28 @@ task_table_set_model (ETaskTable *task_table,
model, "cal-view-complete",
G_CALLBACK (task_table_model_cal_view_complete_cb),
task_table);
+
+ /* redraw on drawing options change */
+ g_signal_connect (
+ model, "notify::highlight-due-today",
+ G_CALLBACK (task_table_queue_draw_cb),
+ task_table);
+
+ g_signal_connect (
+ model, "notify::color-due-today",
+ G_CALLBACK (task_table_queue_draw_cb),
+ task_table);
+
+ g_signal_connect (
+ model, "notify::highlight-overdue",
+ G_CALLBACK (task_table_queue_draw_cb),
+ task_table);
+
+ g_signal_connect (
+ model, "notify::color-overdue",
+ G_CALLBACK (task_table_queue_draw_cb),
+ task_table);
+
}
static void
@@ -397,6 +429,7 @@ task_table_dispose (GObject *object)
}
if (priv->model != NULL) {
+ g_signal_handlers_disconnect_by_func (priv->model, task_table_queue_draw_cb, object);
g_object_unref (priv->model);
priv->model = NULL;
}