From 026e76465697c7a8df48af89f4b3845902219fe7 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 18 Aug 2009 22:47:49 -0400 Subject: Trim more fat off the GnomeCalendar API. Oh and hey look, I can see events now! --- calendar/gui/ea-gnome-calendar.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'calendar/gui/ea-gnome-calendar.c') diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c index f021214c5a..58ecad70fd 100644 --- a/calendar/gui/ea-gnome-calendar.c +++ b/calendar/gui/ea-gnome-calendar.c @@ -130,6 +130,8 @@ ea_gnome_calendar_new (GtkWidget *widget) const gchar * ea_gnome_calendar_get_label_description (GnomeCalendar *gcal) { + GnomeCalendarViewType view_type; + ECalendarView *calendar_view; ECalModel *model; icaltimezone *zone; struct icaltimetype start_tt, end_tt; @@ -139,10 +141,15 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal) gchar end_buffer[256]; GnomeCalendarViewType view; - model = gnome_calendar_get_calendar_model (gcal); - gnome_calendar_get_visible_time_range (gcal, &start_time, &end_time); + model = gnome_calendar_get_model (gcal); zone = e_cal_model_get_timezone (model); + view_type = gnome_calendar_get_view (gcal); + calendar_view = gnome_calendar_get_calendar_view (gcal, view_type); + + e_calendar_view_get_visible_time_range ( + calendar_view, &start_time, &end_time); + start_tt = icaltime_from_timet_with_zone (start_time, FALSE, zone); start_tm.tm_year = start_tt.year - 1900; start_tm.tm_mon = start_tt.month - 1; -- cgit v1.2.3