aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gncal-todo.c
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-03-09 22:25:56 +0800
committerSeth Alves <alves@src.gnome.org>2000-03-09 22:25:56 +0800
commit873dfc7f89dcda2ce62feee64f6e800ba79fd84f (patch)
tree1b09d58298448e54510944cf4d38976a7bcd530a /calendar/gui/gncal-todo.c
parent207a1395e10cbce4f9ec3baa33a649fb9a151a27 (diff)
downloadgsoc2013-evolution-873dfc7f89dcda2ce62feee64f6e800ba79fd84f.tar
gsoc2013-evolution-873dfc7f89dcda2ce62feee64f6e800ba79fd84f.tar.gz
gsoc2013-evolution-873dfc7f89dcda2ce62feee64f6e800ba79fd84f.tar.bz2
gsoc2013-evolution-873dfc7f89dcda2ce62feee64f6e800ba79fd84f.tar.lz
gsoc2013-evolution-873dfc7f89dcda2ce62feee64f6e800ba79fd84f.tar.xz
gsoc2013-evolution-873dfc7f89dcda2ce62feee64f6e800ba79fd84f.tar.zst
gsoc2013-evolution-873dfc7f89dcda2ce62feee64f6e800ba79fd84f.zip
replaced "Calendar *cal" with "CalClient *calc" in the GnomeCalendar
* gui/gnome-cal.h: replaced "Calendar *cal" with "CalClient *calc" in the GnomeCalendar struct. * gui/*.c: tracked change from Calendar * to CalClient * gui/main.c: moved alarm_defaults from here to cal-util/calobj.c (calendar_get_events_in_range): pulled this out of calendar.c and fixed it up to use cal-client stuff. i'm not sure where to put it yet. * gui/main.c (calendar_iterate): pulled this one out of calendar.c also svn path=/trunk/; revision=2090
Diffstat (limited to 'calendar/gui/gncal-todo.c')
-rw-r--r--calendar/gui/gncal-todo.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c
index 64ea8d0638..87fd1b68ba 100644
--- a/calendar/gui/gncal-todo.c
+++ b/calendar/gui/gncal-todo.c
@@ -798,7 +798,6 @@ insert_in_clist (GncalTodo *todo, iCalObject *ico)
void
gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags)
{
- GList *list;
GSList *current_list;
g_return_if_fail (todo != NULL);
@@ -844,7 +843,9 @@ gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags)
gtk_clist_set_column_visibility (todo->clist, 2, 0);
/* free the memory locations that were used in the previous display */
- for (current_list = todo->data_ptrs; current_list != NULL; current_list = g_slist_next(current_list)){
+ for (current_list = todo->data_ptrs;
+ current_list != NULL;
+ current_list = g_slist_next(current_list)){
g_free(current_list->data);
}
@@ -854,8 +855,25 @@ gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags)
gtk_clist_clear (todo->clist);
- for (list = todo->calendar->cal->todo; list; list = list->next)
+ {
+ /* DELETE
+ for (list = todo->calendar->cal->todo; list; list = list->next)
insert_in_clist (todo, list->data);
+ */
+
+ GList *l, *uids;
+ uids = cal_client_get_uids (todo->calendar->calc,
+ CALOBJ_TYPE_EVENT);
+ for (l = uids; l; l = l->next){
+ char *obj_string =
+ cal_client_get_object (todo->calendar->calc,
+ l->data);
+ iCalObject *obj = string_to_ical_object (obj_string);
+ insert_in_clist (todo, obj);
+ g_free (l->data);
+ }
+ g_list_free (uids);
+ }
/* if we are autoresizing then do it now */
if(todo_list_autoresize && todo->clist->rows != 0)