diff options
Diffstat (limited to 'calendar/gui/e-cal-model-tasks.c')
-rw-r--r-- | calendar/gui/e-cal-model-tasks.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c index 0d36136b51..2ef9420788 100644 --- a/calendar/gui/e-cal-model-tasks.c +++ b/calendar/gui/e-cal-model-tasks.c @@ -371,8 +371,18 @@ is_complete (ECalModelComponent *comp_data) icalproperty *prop; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY); + if (prop) + return TRUE; + + prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PERCENTCOMPLETE_PROPERTY); + if (prop && icalproperty_get_percentcomplete (prop) == 100) + return TRUE; - return prop ? TRUE : FALSE; + prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_STATUS_PROPERTY); + if (prop && icalproperty_get_status (prop) == ICAL_STATUS_COMPLETED) + return TRUE; + + return FALSE; } typedef enum { |