From c71bb120b455dae7614951e835a0a47f3a9c4c97 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 31 Jul 2009 19:45:41 +0200 Subject: Bug #590392 - Show selected day in day view's second timezone column --- calendar/gui/e-day-view-time-item.c | 6 +++--- calendar/gui/e-day-view.c | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c index c3129b6aba..8c4a2fdf07 100644 --- a/calendar/gui/e-day-view-time-item.c +++ b/calendar/gui/e-day-view-time-item.c @@ -134,7 +134,7 @@ e_day_view_time_item_init (EDayViewTimeItem *dvtmitem) dvtmitem->dragging_selection = FALSE; dvtmitem->second_zone = NULL; - last = calendar_config_get_day_second_zone(); + last = calendar_config_get_day_second_zone (); if (last) { if (*last) @@ -360,14 +360,14 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item, gint diff; struct tm mn; - tt = icaltime_today (); + tt = icaltime_from_timet_with_zone (day_view->day_starts[0], 0, cal_zone); /* diff is number of minutes */ diff = (icaltimezone_get_utc_offset (use_zone, &tt, NULL) - icaltimezone_get_utc_offset (cal_zone, &tt, NULL) ) / 60; - tt = icaltime_today (); + tt = icaltime_from_timet_with_zone (day_view->day_starts[0], 0, cal_zone); tt.is_date = FALSE; icaltime_set_timezone (&tt, cal_zone); tt = icaltime_convert_to_zone (tt, use_zone); diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index e50197b963..bb8d1f0b57 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -817,6 +817,7 @@ static void time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpointer user_data) { EDayView *day_view = E_DAY_VIEW (user_data); + EDayViewTimeItem *eti; time_t lower; g_return_if_fail (E_IS_DAY_VIEW (day_view)); @@ -846,6 +847,11 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo if (day_view->selection_start_row != -1) e_day_view_ensure_rows_visible (day_view, day_view->selection_start_row, day_view->selection_start_row); + + /* update the time canvas to show proper date in it */ + eti = E_DAY_VIEW_TIME_ITEM (day_view->time_canvas_item); + if (eti && eti->second_zone) + gtk_widget_queue_draw (day_view->time_canvas); } static void -- cgit