From dbb7b4fd11c47b3bcce2146035d306a11ce18c5d Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 24 Jul 2002 18:21:13 +0000 Subject: set status to in progress if the percent is between 0 and 100 2002-07-24 JP Rosevear * gui/calendar-model.c (set_percent): set status to in progress if the percent is between 0 and 100 (set_status): if the value is set to in process, change the percent to 50 svn path=/trunk/; revision=17574 --- calendar/ChangeLog | 11 +++++++++-- calendar/gui/calendar-model.c | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b67045e80c..be3a39d09f 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,10 +1,17 @@ -2002-07-24 +2002-07-24 JP Rosevear + * gui/calendar-model.c (set_percent): set status to in progress if + the percent is between 0 and 100 + (set_status): if the value is set to in process, change the + percent to 50 + +2002-07-24 JP Rosevear + * cal-util/timeutil.c (time_day_of_year): add a day for the leap year only if we are currently counting Feb., not if the month passed in is Feb. Fixes #23446. -2002-07-23 +2002-07-23 JP Rosevear * gui/e-day-view.c (e_day_view_realize): use proper meeting icon diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 55663f254c..c2416344ff 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -839,7 +839,6 @@ calendar_model_value_at (ETableModel *etm, int col, int row) case CAL_COMPONENT_FIELD_ICON: { ItipAddress *ia; - CalComponentOrganizer organizer; GSList *attendees = NULL, *sl; gint retval = 0; @@ -1087,8 +1086,11 @@ set_percent (CalComponent *comp, const void *value) if (percent == 100) ensure_task_complete (comp, -1); - else + else { ensure_task_not_complete (comp); + if (percent > 0) + cal_component_set_status (comp, ICAL_STATUS_INPROCESS); + } } } @@ -1195,6 +1197,10 @@ set_status (CalComponent *comp, const char *value) percent = 0; cal_component_set_percent (comp, &percent); cal_component_set_completed (comp, NULL); + } else if (status == ICAL_STATUS_INPROCESS) { + ensure_task_not_complete (comp); + percent = 50; + cal_component_set_percent (comp, &percent); } else if (status == ICAL_STATUS_COMPLETED) { ensure_task_complete (comp, -1); } -- cgit v1.2.3