aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r--calendar/gui/e-day-view-main-item.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index f7f86c6660..f28e0c6a2b 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -604,7 +604,15 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
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++;
+ }
if (num_icons != 0) {
if (item_h >= (E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD)
@@ -683,8 +691,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
GdkBitmap *mask = NULL;
category = (char *) elem->data;
- e_categories_config_get_icon_for (category, &pixmap, &mask);
- if (pixmap == NULL)
+ if (!e_categories_config_get_icon_for (category, &pixmap, &mask))
continue;
max_icon_w = item_x + item_w - icon_x