diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-05-11 17:35:00 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-05-11 17:35:00 +0800 |
commit | 91a1042a4aaa980ef8faf96bf63949e0a4bc91f2 (patch) | |
tree | 4431115bb20be235d05273522eb7d3965d786b8b /calendar/gui/e-calendar-view.c | |
parent | c161c47d1ef22ad1ec1cc7089e6830595e8f090c (diff) | |
download | gsoc2013-evolution-91a1042a4aaa980ef8faf96bf63949e0a4bc91f2.tar.gz gsoc2013-evolution-91a1042a4aaa980ef8faf96bf63949e0a4bc91f2.tar.zst gsoc2013-evolution-91a1042a4aaa980ef8faf96bf63949e0a4bc91f2.zip |
partially fixes #332911
svn path=/trunk/; revision=31971
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r-- | calendar/gui/e-calendar-view.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index f1c7c2d954..2327914576 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -2054,12 +2054,12 @@ tooltip_grab (GtkWidget *tooltip, GdkEventKey *event, ECalendarView *view) } static char * -get_label (struct icaltimetype *tt) +get_label (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone) { char buffer[1000]; struct tm tmp_tm; - tmp_tm = icaltimetype_to_tm (tt); + tmp_tm = icaltimetype_to_tm_with_zone (tt, f_zone, t_zone); e_time_format_date_and_time (&tmp_tm, calendar_config_get_24_hour_format (), FALSE, FALSE, @@ -2129,12 +2129,15 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data) GtkStyle *style = gtk_widget_get_default_style (); GtkWidget *widget = (GtkWidget *) g_object_get_data (G_OBJECT (data->cal_view), "tooltip-window"); ECalComponent *newcomp = e_cal_component_new (); - icaltimezone *zone; + icaltimezone *zone, *default_zone; + ECal *client = NULL; /* Delete any stray tooltip if left */ if (widget) gtk_widget_destroy (widget); + client = pevent->comp_data->client; + default_zone = e_calendar_view_get_timezone (data->cal_view); pevent = data->get_view_event (data->cal_view, data->day, data->event_num); clone_comp = icalcomponent_new_clone (pevent->comp_data->icalcomp); @@ -2211,19 +2214,19 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data) if (dtstart.tzid) { zone = icalcomponent_get_timezone (e_cal_component_get_icalcomponent (newcomp), dtstart.tzid); - } else { - zone = NULL; - } - t_start = icaltime_as_timet_with_zone (*dtstart.value, zone); + if (!zone) + e_cal_get_timezone (client, dtstart.tzid, &zone, NULL); + + if (!zone) + zone = default_zone; - if (dtend.tzid) { - zone = icalcomponent_get_timezone (e_cal_component_get_icalcomponent (newcomp), dtend.tzid); } else { zone = NULL; } + t_start = icaltime_as_timet_with_zone (*dtstart.value, zone); t_end = icaltime_as_timet_with_zone (*dtend.value, zone); - tmp1 = get_label(dtstart.value); + tmp1 = get_label(dtstart.value, zone, default_zone); tmp = calculate_time (t_start, t_end); /* To Translators: It will display "Time: ActualStartDateAndTime (DurationOfTheMeeting)"*/ |