From 9d8f94804917a0338a08be9f36a8e047ccedd939 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Tue, 7 Aug 2001 00:46:56 +0000 Subject: added 'different_timezone' fields to EDayViewEvent and EWeekViewEvent, to 2001-08-06 Damon Chaplin * gui/e-week-view.h: * gui/e-day-view.h: added 'different_timezone' fields to EDayViewEvent and EWeekViewEvent, to note that the event is in a different timezone. We now compute this once when we add the event to the array, rather than each time we draw the event. If it is set, we will draw the timezone icon next to the event. * gui/e-day-view-main-item.c: take transparency into account when drawing the blue vertical bars to represent busy time. * gui/tag-calendar.c: take transparency into account when tagging the mini calendar. * gui/e-calendar-table.c (e_calendar_table_init): removed the "None" options for transparency and classification, since these properties have defaults anyway, so we may as well use those to keep it simple. Also use "Free" and "Busy" for transparency, rather than "Transparent" and "Opaque". * gui/calendar-model.c: updated classification & transparency code as above. * gui/e-calendar-table.etspec: changed "Transparency" to "Show Time As" since people have a chance of understanding that. * gui/e-week-view.c: * gui/e-day-view.c: * gui/gnome-cal.c: added functions to get the visible time range. * gui/calendar-commands.c: finished stuff to set the folder bar label to the dates currently displayed. * gui/control-factory.c (control_factory_new_control): connected signal to update the folder title bar label when the dates shown are changed. I had to connect it here since we need the BonoboControl in the callback, and I don't know how to get the control from the widget. * gui/tasks-control.c (tasks_control_activate): clear the folder bar label. We could display something here at some point. * gui/dialogs/recurrence-page.glade: changed "_Add" to "A_dd", since we have an "_Actions" menu. (These also use Alt+key, right?) * gui/dialogs/event-page.glade: * gui/dialogs/event-page.c: added 'Show Time As' field, which is really the TRANSP property but with a better name! Also changed one of the "_Confidential" to "Con_fidential" since we already have "_Contacts" using the same 'C' key. * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): skip events that are TRANSPARENT. Also added comment as this code looks inefficient. * cal-util/cal-component.c: removed stuff for comparing timezones. * gui/comp-util.c (cal_comp_util_compare_event_timezones): moved the above function here, and updated it to compare the UTC offsets of the times as well as the TZIDs. svn path=/trunk/; revision=11717 --- calendar/gui/tag-calendar.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'calendar/gui/tag-calendar.c') diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c index de59407c20..30ee02520c 100644 --- a/calendar/gui/tag-calendar.c +++ b/calendar/gui/tag-calendar.c @@ -35,6 +35,8 @@ struct calendar_tag_closure { icaltimezone *zone; time_t start_time; time_t end_time; + + gboolean skip_transparent_events; }; /* Clears all the tags in a calendar and fills a closure structure with the @@ -90,6 +92,15 @@ tag_calendar_cb (CalComponent *comp, { struct calendar_tag_closure *c = data; struct icaltimetype start_tt, end_tt; + CalComponentTransparency transparency; + + /* If we are skipping TRANSPARENT events, return if the event is + transparent. */ + if (c->skip_transparent_events) { + cal_component_get_transparency (comp, &transparency); + if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT) + return TRUE; + } start_tt = icaltime_from_timet_with_zone (istart, FALSE, c->zone); end_tt = icaltime_from_timet_with_zone (iend - 1, FALSE, c->zone); @@ -131,6 +142,8 @@ tag_calendar_by_client (ECalendar *ecal, CalClient *client) if (!prepare_tag (ecal, &c, TRUE)) return; + c.skip_transparent_events = TRUE; + #if 0 g_print ("DateNavigator generating instances\n"); #endif @@ -147,6 +160,7 @@ tag_calendar_by_client (ECalendar *ecal, CalClient *client) * * Tags an #ECalendar widget with any occurrences of a specific calendar * component that occur within the calendar's current time range. + * Note that TRANSPARENT events are also tagged here. **/ void tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp, CalClient *client, gboolean clear_first) @@ -165,6 +179,8 @@ tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp, CalClient *client, gb if (!prepare_tag (ecal, &c, clear_first)) return; + c.skip_transparent_events = FALSE; + #if 0 g_print ("DateNavigator generating instances\n"); #endif -- cgit v1.2.3