aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view-event-item.c
diff options
context:
space:
mode:
authorHiroyuki Ikezoe <poincare@ikezoe.net>2007-10-07 09:26:26 +0800
committerHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-10-07 09:26:26 +0800
commitf1b6fa21b9bfb030ad838f36abf2107ae190036c (patch)
tree8f0f95bdf136865d444cbad7fdf799ab228fe159 /calendar/gui/e-week-view-event-item.c
parente093117ef673e80c54e603ee0ed1dbd487a4bcb6 (diff)
downloadgsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.tar
gsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.tar.gz
gsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.tar.bz2
gsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.tar.lz
gsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.tar.xz
gsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.tar.zst
gsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.zip
** Fix for bug #455862 Plugged memory leaks.
2007-10-07 Hiroyuki Ikezoe <poincare@ikezoe.net> ** Fix for bug #455862 Plugged memory leaks. * gui/comp-util.c: * gui/comp-util.h:(cal_comp_util_get_n_icons): A new function to get the number of icons owned by ECalComponent. * gui/e-day-view-main-item.c: * gui/e-day-view.c: * gui/e-week-view-event-item.c: * gui/e-week-view.c: Use cal_comp_util_get_n_icons. svn path=/trunk/; revision=34359
Diffstat (limited to 'calendar/gui/e-week-view-event-item.c')
-rw-r--r--calendar/gui/e-week-view-event-item.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index e786d5a741..16fa41102d 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -37,6 +37,7 @@
#include <gtk/gtksignal.h>
#include "e-calendar-view.h"
+#include "comp-util.h"
#include <text/e-text.h>
@@ -632,16 +633,8 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
num_icons++;
}
+ num_icons += cal_comp_util_get_n_icons (comp);
e_cal_component_get_categories_list (comp, &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;
@@ -1351,16 +1344,9 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
num_icons++;
}
- e_cal_component_get_categories_list (comp, &categories_list);
- for (elem = categories_list; elem; elem = elem->next) {
- char *category;
- GdkPixmap *pixmap = NULL;
- GdkBitmap *mask = NULL;
+ num_icons += cal_comp_util_get_n_icons (comp);
- category = (char *) elem->data;
- if (e_categories_config_get_icon_for (category, &pixmap, &mask))
- num_icons++;
- }
+ e_cal_component_get_categories_list (comp, &categories_list);
icon_x_inc = E_WEEK_VIEW_ICON_WIDTH + E_WEEK_VIEW_ICON_X_PAD;