aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-cal-popup.c')
-rw-r--r--calendar/gui/e-cal-popup.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index eb542459a7..2f80f7d34a 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -569,8 +569,18 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr
mask &= ~E_CAL_POPUP_SELECT_ANY;
if (t->events->len == 1)
mask &= ~E_CAL_POPUP_SELECT_ONE;
- else
+ else {
mask &= ~E_CAL_POPUP_SELECT_MANY;
+ /* Now check for any incomplete tasks and set the flags*/
+ int i=0;
+ for (; i < t->events->len; i++) {
+ ECalModelComponent *comp_data = (ECalModelComponent *)t->events->pdata[i];
+ if (!icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY)) {
+ mask &= ~E_CAL_POPUP_SELECT_NOTCOMPLETE;
+ break;
+ }
+ }
+ }
if (icalcomponent_get_first_property (comp_data->icalcomp, ICAL_URL_PROPERTY))
mask &= ~E_CAL_POPUP_SELECT_HASURL;