From df76500b5db77f36b9c70325bec72a722a012d21 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Wed, 24 Jan 2001 01:06:02 +0000 Subject: make sure the status is set to "Completed". Fixes bug #1253. 2001-01-23 Damon Chaplin * gui/calendar-model.c (ensure_task_complete): make sure the status is set to "Completed". Fixes bug #1253. * gui/e-tasks.c (e_tasks_open): load the ETable state after opening the tasks folder, since it relies on the folder uri, which isn't set now until you open the folder. * gui/calendar-model.c (obj_updated_cb): add the categories from the updated object to our tree, and emit the "categories-changed" signal if they have changed. Fixes bug #1255. * gui/e-tasks.c: removed debug messages. svn path=/trunk/; revision=7771 --- calendar/gui/calendar-model.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'calendar/gui/calendar-model.c') diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 3721366cf0..1640b299f8 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -1698,6 +1698,14 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data) e_table_model_row_changed (E_TABLE_MODEL (model), *new_idx); } + /* See if we need to add any categories. Note that old + categories won't be removed, but I don't think that matters + too much here. */ + if (calendar_model_collect_categories (model, new_comp)) { + gtk_signal_emit (GTK_OBJECT (model), + calendar_model_signals [CATEGORIES_CHANGED]); + } + break; case CAL_CLIENT_GET_NOT_FOUND: @@ -1986,6 +1994,7 @@ ensure_task_complete (CalComponent *comp, struct icaltimetype *old_completed = NULL; struct icaltimetype new_completed; int *old_percent, new_percent; + icalproperty_status status; gboolean set_completed = TRUE; /* Date Completed. */ @@ -2013,6 +2022,12 @@ ensure_task_complete (CalComponent *comp, } if (old_percent) cal_component_free_percent (old_percent); + + /* Status. */ + cal_component_get_status (comp, &status); + if (status != ICAL_STATUS_COMPLETED) { + cal_component_set_status (comp, ICAL_STATUS_COMPLETED); + } } -- cgit v1.2.3