From 421aa80ae6961cb4ddef8e79133ce89fcfbbf52d Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Thu, 12 Jul 2001 02:38:25 +0000 Subject: renamed updateObject to updateObjects and removed the UID argument, since 2001-07-11 Damon Chaplin * idl/evolution-calendar.idl: renamed updateObject to updateObjects and removed the UID argument, since it can add/update multiple objects at once. (It can't yet, but it will!) * pcs/cal.c: * pcs/cal-backend.[hc]: * pcs/cal-backend-file.c: renamed update_object to update_objects and got rid of the UID arg. * cal-client/cal-client.c (cal_client_update_objects): new function to add/update multiple objects in one go, i.e for iTIP and for importing calendars. * gui/print.c (print_date_label): fixed type bug. * gui/e-week-view.[hc]: * gui/e-week-view-event-item.c: draw the timezone icons if the event's DTSTART or DTEND is in a different timezone to the current one. Note that we may want to change this so it compares the UTC offsets rather than the TZIDs, since currently it will draw the icons for all events coming from iTIP requests from other clients. svn path=/trunk/; revision=11027 --- calendar/gui/e-week-view-event-item.c | 17 +++++++++++++++++ calendar/gui/e-week-view.c | 6 ++++++ calendar/gui/e-week-view.h | 2 ++ calendar/gui/print.c | 2 +- 4 files changed, 26 insertions(+), 1 deletion(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 06a065d364..a31b6e3ae6 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -559,6 +559,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, GdkGC *gc; gint num_icons = 0, icon_x_inc; gboolean draw_reminder_icon = FALSE, draw_recurrence_icon = FALSE; + gboolean draw_timezone_icon = FALSE; GSList *categories_list, *elem; week_view = E_WEEK_VIEW (GTK_WIDGET (GNOME_CANVAS_ITEM (wveitem)->canvas)->parent); @@ -581,6 +582,11 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, num_icons++; } + if (!cal_component_compare_event_timezone (comp, week_view->zone)) { + draw_timezone_icon = TRUE; + num_icons++; + } + cal_component_get_categories_list (comp, &categories_list); num_icons += g_slist_length (categories_list); @@ -611,6 +617,17 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, icon_x += icon_x_inc; } + if (draw_timezone_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) { + gdk_gc_set_clip_origin (gc, icon_x, icon_y); + gdk_gc_set_clip_mask (gc, week_view->timezone_mask); + gdk_draw_pixmap (drawable, gc, + week_view->timezone_icon, + 0, 0, icon_x, icon_y, + E_WEEK_VIEW_ICON_WIDTH, + E_WEEK_VIEW_ICON_HEIGHT); + icon_x += icon_x_inc; + } + /* draw categories icons */ for (elem = categories_list; elem; elem = elem->next) { char *category; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 62e44644fa..2cf036289f 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -60,6 +60,7 @@ /* Images */ #include "art/bell.xpm" #include "art/recur.xpm" +#include "art/timezone-16.xpm" #include "art/jump.xpm" #define E_WEEK_VIEW_SMALL_FONT \ @@ -541,6 +542,7 @@ e_week_view_realize (GtkWidget *widget) /* Create the pixmaps. */ week_view->reminder_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->reminder_mask, NULL, bell_xpm); week_view->recurrence_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->recurrence_mask, NULL, recur_xpm); + week_view->timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->timezone_mask, NULL, timezone_16_xpm); } @@ -2457,6 +2459,10 @@ e_week_view_reshape_event_span (EWeekView *week_view, if (cal_component_has_recurrences (comp)) num_icons++; + if (!cal_component_compare_event_timezone (comp, + week_view->zone)) + num_icons++; + cal_component_get_categories_list (comp, &categories_list); num_icons += g_slist_length (categories_list); diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h index 4bbc0477d2..5b3f257f5e 100644 --- a/calendar/gui/e-week-view.h +++ b/calendar/gui/e-week-view.h @@ -303,6 +303,8 @@ struct _EWeekView GdkBitmap *reminder_mask; GdkPixmap *recurrence_icon; GdkBitmap *recurrence_mask; + GdkPixmap *timezone_icon; + GdkBitmap *timezone_mask; /* Colors for drawing. */ GdkColor colors[E_WEEK_VIEW_COLOR_LAST]; diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 5fda525e71..9a290fdf09 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -2104,7 +2104,7 @@ print_date_label (GnomePrintContext *pc, CalComponent *comp, cal_component_get_completed (comp, &datetime.value); if (datetime.value) complete = icaltime_as_timet_with_zone (*datetime.value, zone); - cal_component_free_icaltimetype (&datetime.value); + cal_component_free_icaltimetype (datetime.value); buffer[0] = '\0'; -- cgit v1.2.3