From f0544b36bf0ce4ec26f337bfc583f93af50cf705 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 2 Jul 2002 23:18:47 +0000 Subject: Fixes #16034 2002-07-02 Rodrigo Moya Fixes #16034 * gui/e-day-view.c (e_day_view_reshape_long_event): (e_day_view_reshape_day_event): * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event): * gui/e-week-view.c (e_week_view_reshape_event_span): * gui/e-week-view-event-item.c (e_week_view_event_item_draw_icons): Don't assume all categories have icons when allocating space for the icons. svn path=/trunk/; revision=17357 --- calendar/gui/e-week-view.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-week-view.c') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 514558cc58..22b4623f13 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2614,7 +2614,7 @@ e_week_view_reshape_event_span (EWeekView *week_view, /* Calculate how many icons we need to show. */ num_icons = 0; if (show_icons) { - GSList *categories_list; + GSList *categories_list, *elem; if (cal_component_has_alarms (comp)) num_icons++; @@ -2624,7 +2624,15 @@ e_week_view_reshape_event_span (EWeekView *week_view, num_icons++; cal_component_get_categories_list (comp, &categories_list); - num_icons += g_slist_length (categories_list); + for (elem = categories_list; elem; elem = elem->next) { + char *category; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask = NULL; + + category = (char *) elem->data; + if (e_categories_config_get_icon_for (category, &pixmap, &mask)) + num_icons++; + } cal_component_free_categories_list (categories_list); } -- cgit