aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-07-03 07:18:47 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-07-03 07:18:47 +0800
commitf0544b36bf0ce4ec26f337bfc583f93af50cf705 (patch)
treeb5b9739a8784ed4639c149acdbc1288103aba442 /calendar/gui/e-day-view-main-item.c
parent4f31e9f28300834c3f8d2bfec7c35cac2b6995b0 (diff)
downloadgsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.tar.gz
gsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.tar.zst
gsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.zip
Fixes #16034
2002-07-02 Rodrigo Moya <rodrigo@ximian.com> 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
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