aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view-event-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-week-view-event-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-week-view-event-item.c')
-rw-r--r--calendar/gui/e-week-view-event-item.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 4d532be5bf..f680be8f0d 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -589,7 +589,15 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
}
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++;
+ }
icon_x_inc = E_WEEK_VIEW_ICON_WIDTH + E_WEEK_VIEW_ICON_X_PAD;
@@ -636,8 +644,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
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;
if (icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {