aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-model.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2001-01-06 02:23:51 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-01-06 02:23:51 +0800
commitec532d28e42f4c0fb912bf7442b092e65d273178 (patch)
treeadeed36f523048363d3cdfbf425a32cea0e1a28b /calendar/gui/calendar-model.c
parent601f4bc6b207a54bb4ec6a633eb4568e40474777 (diff)
downloadgsoc2013-evolution-ec532d28e42f4c0fb912bf7442b092e65d273178.tar
gsoc2013-evolution-ec532d28e42f4c0fb912bf7442b092e65d273178.tar.gz
gsoc2013-evolution-ec532d28e42f4c0fb912bf7442b092e65d273178.tar.bz2
gsoc2013-evolution-ec532d28e42f4c0fb912bf7442b092e65d273178.tar.lz
gsoc2013-evolution-ec532d28e42f4c0fb912bf7442b092e65d273178.tar.xz
gsoc2013-evolution-ec532d28e42f4c0fb912bf7442b092e65d273178.tar.zst
gsoc2013-evolution-ec532d28e42f4c0fb912bf7442b092e65d273178.zip
get categories button (init_widgets): listen for button click
2001-01-05 JP Rosevear <jpr@helixcode.com> * gui/dialogs/task-editor.c (get_widgets): get categories button (init_widgets): listen for button click (fill_widgets): fill in the categories area (dialog_to_comp_object): set the cal component categories (categories_clicked): throw up the categories dialog and update when ok is clicked * gui/dialogs/task-editor-dialog.glade: Tweak to name the categories button and make it active * gui/calendar-model.c (get_categories): We can get the string list of categories directly now * cal-util/cal-component.c (cal_component_get_categories): new function to get the categories list as a string (cal_component_set_categories): same but for setting (free_icalcomponent): init the categories var (scan_categories): kill (scan_property): assign the prop to the categories var (cal_component_get_categories_list): deal with renaming var to categories (cal_component_set_categories_list): fix brokeness svn path=/trunk/; revision=7268
Diffstat (limited to 'calendar/gui/calendar-model.c')
-rw-r--r--calendar/gui/calendar-model.c26
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 */