diff options
Diffstat (limited to 'calendar/gui/calendar-model.c')
-rw-r--r-- | calendar/gui/calendar-model.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 55f265390c..7168f2714b 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -303,31 +303,11 @@ get_time_t (CalendarModel *model, time_t *t, gboolean skip_midnight) static char * get_categories (CalComponent *comp) { - GSList *categories; - GString *str; - char *s; - GSList *l; - - cal_component_get_categories_list (comp, &categories); - - str = g_string_new (NULL); - - for (l = categories; l; l = l->next) { - const char *category; - - category = l->data; - g_string_append (str, category); - - if (l->next != NULL) - g_string_append (str, ", "); - } - - s = str->str; + const char *categories; - g_string_free (str, FALSE); - cal_component_free_categories_list (categories); + cal_component_get_categories (comp, &categories); - return s; + return g_strdup (categories); } /* Returns a string based on the CLASSIFICATION property of a calendar component */ |