diff options
author | Hiroyuki Ikezoe <poincare@ikezoe.net> | 2007-10-07 09:26:26 +0800 |
---|---|---|
committer | Hiroyuki Ikezoe <hiikezoe@src.gnome.org> | 2007-10-07 09:26:26 +0800 |
commit | f1b6fa21b9bfb030ad838f36abf2107ae190036c (patch) | |
tree | 8f0f95bdf136865d444cbad7fdf799ab228fe159 /calendar/gui/e-day-view.c | |
parent | e093117ef673e80c54e603ee0ed1dbd487a4bcb6 (diff) | |
download | gsoc2013-evolution-f1b6fa21b9bfb030ad838f36abf2107ae190036c.tar.gz 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-day-view.c')
-rw-r--r-- | calendar/gui/e-day-view.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 73708129d0..e43c71bf7f 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -5625,8 +5625,6 @@ e_day_view_reshape_long_event (EDayView *day_view, } if (show_icons) { - GSList *categories_list, *elem; - if (e_cal_component_has_alarms (comp)) num_icons++; if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp)) @@ -5638,17 +5636,7 @@ e_day_view_reshape_long_event (EDayView *day_view, num_icons++; if (e_cal_component_has_attachments (comp)) 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; - - category = (char *) elem->data; - if (e_categories_config_get_icon_for (category, &pixmap, &mask)) - num_icons++; - } - e_cal_component_free_categories_list (categories_list); + num_icons += cal_comp_util_get_n_icons (comp); } if (!event->canvas_item) { @@ -5798,7 +5786,6 @@ e_day_view_reshape_day_event (EDayView *day_view, if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE || day_view->resize_event_day != day || day_view->resize_event_num != event_num) { - GSList *categories_list, *elem; ECalComponent *comp; comp = e_cal_component_new (); @@ -5815,17 +5802,7 @@ e_day_view_reshape_day_event (EDayView *day_view, if (e_cal_component_has_organizer (comp)) 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; - - category = (char *) elem->data; - if (e_categories_config_get_icon_for (category, &pixmap, &mask)) - num_icons++; - } - e_cal_component_free_categories_list (categories_list); + num_icons += cal_comp_util_get_n_icons (comp); g_object_unref(comp); } |