diff options
author | Damon Chaplin <damon@ximian.com> | 2001-08-07 08:46:56 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-08-07 08:46:56 +0800 |
commit | 9d8f94804917a0338a08be9f36a8e047ccedd939 (patch) | |
tree | 4e29f6218af7cbdc4a84933d9cffddd1b7caa61c /calendar/gui/e-day-view-main-item.c | |
parent | 5949b39e3437ebbf7e7461c58df50424e0993809 (diff) | |
download | gsoc2013-evolution-9d8f94804917a0338a08be9f36a8e047ccedd939.tar.gz gsoc2013-evolution-9d8f94804917a0338a08be9f36a8e047ccedd939.tar.zst gsoc2013-evolution-9d8f94804917a0338a08be9f36a8e047ccedd939.zip |
added 'different_timezone' fields to EDayViewEvent and EWeekViewEvent, to
2001-08-06 Damon Chaplin <damon@ximian.com>
* 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
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r-- | calendar/gui/e-day-view-main-item.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index f17eff457e..5dab65b7f8 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -339,6 +339,7 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem, EDayViewEvent *event; GdkGC *gc; gint grid_x, event_num, bar_y, bar_h; + CalComponentTransparency transparency; day_view = dvmitem->day_view; @@ -353,6 +354,11 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem, event = &g_array_index (day_view->events[day], EDayViewEvent, event_num); + /* If the event is TRANSPARENT, skip it. */ + cal_component_get_transparency (event->comp, &transparency); + if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT) + continue; + /* We can skip the events in the first column since they will draw over this anyway. */ if (event->num_columns > 0 && event->start_row_or_col == 0) @@ -383,6 +389,7 @@ e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem, EDayViewEvent *event; gint event_num, start_day, end_day, day, bar_y1, bar_y2, grid_x; GdkGC *gc; + CalComponentTransparency transparency; day_view = dvmitem->day_view; @@ -394,6 +401,11 @@ e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem, event = &g_array_index (day_view->long_events, EDayViewEvent, event_num); + /* If the event is TRANSPARENT, skip it. */ + cal_component_get_transparency (event->comp, &transparency); + if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT) + continue; + if (!e_day_view_find_long_event_days (event, day_view->days_shown, day_view->day_starts, @@ -469,6 +481,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, gint max_icon_w, max_icon_h; gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon; GSList *categories_list, *elem; + CalComponentTransparency transparency; day_view = dvmitem->day_view; @@ -499,7 +512,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, column of the day, we might not want to paint over the vertical bar, since that is used for multiple events. But then you can't see where the event in the first column finishes. */ -#if 0 +#if 1 if (event->start_row_or_col == 0) gdk_draw_rectangle (drawable, style->white_gc, TRUE, item_x + E_DAY_VIEW_BAR_WIDTH, item_y + 1, @@ -533,9 +546,13 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, bar_y2 = item_y + item_h - 1; } - gdk_draw_rectangle (drawable, gc, TRUE, - item_x + 1, bar_y1, - E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1); + /* Only fill it in if the event isn't TRANSPARENT. */ + cal_component_get_transparency (event->comp, &transparency); + if (transparency != CAL_COMPONENT_TRANSP_TRANSPARENT) { + gdk_draw_rectangle (drawable, gc, TRUE, + item_x + 1, bar_y1, + E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1); + } /* Draw the box around the entire event. Do this after drawing the colored bar so we don't have to worry about being 1 @@ -581,7 +598,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, /* If the DTSTART or DTEND are in a different timezone to our current timezone, we display the timezone icon. */ - if (!cal_component_compare_event_timezone (comp, day_view->zone)) { + if (event->different_timezone) { draw_timezone_icon = TRUE; num_icons++; } |