aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-03-28 17:14:23 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2014-03-28 18:44:44 +0800
commit61b4bacf9a16bf69c26999dd9acac99695d23242 (patch)
tree01ec1df06524350dc665913445f14bbf8e0dad58 /calendar
parented405f45a5b870b0374f8f714023e1647a1a6701 (diff)
downloadgsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.gz
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.bz2
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.lz
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.xz
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.tar.zst
gsoc2013-evolution-61b4bacf9a16bf69c26999dd9acac99695d23242.zip
e-util: Port to thread-safe ECategories API
This ports the following two function calls throughout Evolution: • e_categories_get_list() to e_categories_dup_list() • e_categories_get_icon_file_for() to e_categories_dup_icon_file_for() It necessarily changes some internal e-util API: • e_util_get_searchable_categories() to e_util_dup_searchable_categories() This bumps the EDS requirement to 3.13.1. https://bugzilla.gnome.org/show_bug.cgi?id=727221
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/e-cal-component-preview.c6
-rw-r--r--calendar/gui/e-day-view-top-item.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index cdfaeeaf17..fa1aca0253 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -230,9 +230,9 @@ cal_component_preview_write_html (ECalComponentPreview *preview,
g_string_append_printf (buffer, "<tr><th>%s</th><td>", _("Categories:"));
for (iter = list; iter != NULL; iter = iter->next) {
const gchar *category = iter->data;
- const gchar *icon_file;
+ gchar *icon_file;
- icon_file = e_categories_get_icon_file_for (category);
+ icon_file = e_categories_dup_icon_file_for (category);
if (icon_file && g_file_test (icon_file, G_FILE_TEST_EXISTS)) {
gchar *uri;
@@ -246,6 +246,8 @@ cal_component_preview_write_html (ECalComponentPreview *preview,
g_string_append_len (string, ", ", 2);
g_string_append (string, category);
}
+
+ g_free (icon_file);
}
if (string->len > 0)
g_string_append_printf (buffer, "%s", string->str);
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 6e836c6822..300170ba07 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -452,15 +452,16 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
gchar *category;
- const gchar *file;
+ gchar *file;
GdkPixbuf *pixbuf;
category = (gchar *) elem->data;
- file = e_categories_get_icon_file_for (category);
+ file = e_categories_dup_icon_file_for (category);
if (!file)
continue;
pixbuf = gdk_pixbuf_new_from_file (file, NULL);
+ g_free (file);
if (pixbuf == NULL)
continue;