diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-07-03 07:18:47 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-07-03 07:18:47 +0800 |
commit | f0544b36bf0ce4ec26f337bfc583f93af50cf705 (patch) | |
tree | b5b9739a8784ed4639c149acdbc1288103aba442 /calendar/gui/e-week-view.c | |
parent | 4f31e9f28300834c3f8d2bfec7c35cac2b6995b0 (diff) | |
download | gsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.tar gsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.tar.gz gsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.tar.bz2 gsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.tar.lz gsoc2013-evolution-f0544b36bf0ce4ec26f337bfc583f93af50cf705.tar.xz 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.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 12 |
1 files changed, 10 insertions, 2 deletions
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); } |