diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-cal-popup.c | 12 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 2 |
2 files changed, 12 insertions, 2 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; diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 8caa27d6d6..b6788c6cb8 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1189,7 +1189,7 @@ static EPopupItem tasks_popup_items [] = { { E_POPUP_ITEM, "80.assign", N_("_Assign Task"), e_calendar_table_on_assign, NULL, NULL, E_CAL_POPUP_SELECT_ONE, E_CAL_POPUP_SELECT_EDITABLE|E_CAL_POPUP_SELECT_ASSIGNABLE }, { E_POPUP_ITEM, "90.forward", N_("_Forward as iCalendar"), e_calendar_table_on_forward, NULL, "stock_mail-forward", E_CAL_POPUP_SELECT_ONE }, { E_POPUP_ITEM, "a0.markonecomplete", N_("_Mark as Complete"), mark_as_complete_cb, NULL, NULL, E_CAL_POPUP_SELECT_ONE, E_CAL_POPUP_SELECT_EDITABLE | E_CAL_POPUP_SELECT_NOTCOMPLETE}, - { E_POPUP_ITEM, "b0.markmanycomplete", N_("_Mark Selected Tasks as Complete"), mark_as_complete_cb, NULL, NULL, E_CAL_POPUP_SELECT_MANY, E_CAL_POPUP_SELECT_EDITABLE }, + { E_POPUP_ITEM, "b0.markmanycomplete", N_("_Mark Selected Tasks as Complete"), mark_as_complete_cb, NULL, NULL, E_CAL_POPUP_SELECT_MANY, E_CAL_POPUP_SELECT_EDITABLE | E_CAL_POPUP_SELECT_NOTCOMPLETE }, { E_POPUP_BAR, "c0.bar" }, |