diff options
author | Damon Chaplin <damon@ximian.com> | 2001-07-11 11:56:03 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-07-11 11:56:03 +0800 |
commit | 0e6d346872289d1ee71cb7b1092b5229b11dab3e (patch) | |
tree | 588b9cbac780c577af5c56d020c98f2f3822b38f /calendar/gui/e-day-view-main-item.c | |
parent | 552d3501e9bf05d42ce6f342e85a526a1cea702c (diff) | |
download | gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.gz gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.zst gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.zip |
more timezone updates. I'm pretty much done with the calendar code now,
2001-07-10 Damon Chaplin <damon@ximian.com>
* gui/calendar-model.c:
* gui/e-calendar-table.c:
* gui/e-day-view-main-item.c:
* gui/e-day-view-top-item.c:
* gui/e-day-view.[hc]:
* gui/e-week-view.c:
* gui/gnome-cal.c:
* gui/print.c:
* gui/dialogs/cal-prefs-dialog.c:
* gui/dialogs/comp-editor-util.c:
* gui/dialogs/event-page.c:
* pcs/cal-backend-file.c:
* pcs/query.c:
* cal-util/cal-component.[hc]:
* cal-util/cal-recur.c:
* cal-util/timeutil.[hc]:
* cal-client/cal-client.[hc]: more timezone updates. I'm pretty much
done with the calendar code now, except for alarms and conduits,
which Federico and JP know more about. And there are a couple of
other minor things to fix. But it is still pretty buggy.
svn path=/trunk/; revision=10984
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r-- | calendar/gui/e-day-view-main-item.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index cc6224987a..d65193b08b 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -467,7 +467,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, CalComponent *comp; gint num_icons, icon_x, icon_y, icon_x_inc, icon_y_inc; gint max_icon_w, max_icon_h; - gboolean draw_reminder_icon, draw_recurrence_icon; + gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon; GSList *categories_list, *elem; day_view = dvmitem->day_view; @@ -563,6 +563,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, num_icons = 0; draw_reminder_icon = FALSE; draw_recurrence_icon = FALSE; + draw_timezone_icon = FALSE; icon_x = item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_ICON_X_PAD; icon_y = item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_ICON_Y_PAD; @@ -578,6 +579,14 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, num_icons++; } + /* 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)) { + draw_timezone_icon = TRUE; + num_icons++; + } + + cal_component_get_categories_list (comp, &categories_list); num_icons += g_slist_length (categories_list); @@ -632,6 +641,25 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, icon_y += icon_y_inc; } + if (draw_timezone_icon) { + max_icon_w = item_x + item_w - icon_x + - E_DAY_VIEW_EVENT_BORDER_WIDTH; + max_icon_h = item_y + item_h - icon_y + - E_DAY_VIEW_EVENT_BORDER_HEIGHT; + + gdk_gc_set_clip_origin (gc, icon_x, icon_y); + gdk_gc_set_clip_mask (gc, day_view->timezone_mask); + gdk_draw_pixmap (drawable, gc, + day_view->timezone_icon, + 0, 0, icon_x, icon_y, + MIN (E_DAY_VIEW_ICON_WIDTH, + max_icon_w), + MIN (E_DAY_VIEW_ICON_HEIGHT, + max_icon_h)); + icon_x += icon_x_inc; + icon_y += icon_y_inc; + } + /* draw categories icons */ for (elem = categories_list; elem; elem = elem->next) { char *category; |