aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-cal-popup.c12
-rw-r--r--calendar/gui/e-calendar-table.c2
3 files changed, 21 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 5e8b2d30d1..1e13b430c6 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,14 @@
2006-01-05 Johnny Jacob <johnnyjacob@gmail.com>
+ Fixes #258786
+ * gui/e-cal-popup.c (e_cal_popup_target_new_select) : When more than
+ one event is selected, check for ICAL_COMPLETED_PROPERTY and set the bit
+ accordingly.
+ * gui/e-calendar-table.c (tasks_popup_items) : Enable "b0.markmanycomplete" menu item
+ only if E_CAL_POPUP_SELECT_NOTCOMPLETE is set.
+
+2006-01-05 Johnny Jacob <johnnyjacob@gmail.com>
+
Fixes #303193
* gui/alarm-notify/alarm-notify-dialog.c (notified_alarms_dialog_new):
Changed events handled for edit_btn, snooze_btn from pressed to
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" },