week-grid: use a proper function to queue redraw

Same as 97698ad1c9 for the Week grid.
This commit is contained in:
Georges Basile Stavracas Neto
2017-03-14 20:17:46 -03:00
parent 180621cd91
commit c33d820387
+9 -1
View File
@@ -439,6 +439,14 @@ get_today_column (GcalWeekGrid *self)
return days_diff;
}
static gboolean
on_redraw_timeout_cb (gpointer data)
{
gtk_widget_queue_draw (data);
return G_SOURCE_CONTINUE;
}
static gboolean
gcal_week_grid_draw (GtkWidget *widget,
cairo_t *cr)
@@ -605,7 +613,7 @@ gcal_week_grid_draw (GtkWidget *widget,
if (self->redraw_timeout_id == 0)
{
self->redraw_timeout_id = g_timeout_add_seconds (5,
(GSourceFunc) gtk_widget_queue_draw,
on_redraw_timeout_cb,
self);
}