diff options
Diffstat (limited to 'calendar/gui/e-day-view-top-item.c')
-rw-r--r-- | calendar/gui/e-day-view-top-item.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index ed5d8b0266..5364e1e718 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -677,14 +677,18 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item, } if (show_dates) { + gint days_shown; + + days_shown = e_day_view_get_days_shown (day_view); + /* Draw the date. Set a clipping rectangle * so we don't draw over the next day. */ - for (day = 0; day < day_view->days_shown; day++) { + for (day = 0; day < days_shown; day++) { e_day_view_top_item_get_day_label ( day_view, day, buffer, sizeof (buffer)); clip_rect.x = day_view->day_offsets[day] - x; clip_rect.y = 2 - y; - if (day_view->days_shown == 1) { + if (days_shown == 1) { gtk_widget_get_allocation ( day_view->top_canvas, &allocation); clip_rect.width = |