[evolution-patches] [Tasks] Fix for Bug 258786
- From: Johnny Jacob <johnnyjacob gmail com>
- To: evolution-patches gnome org
- Subject: [evolution-patches] [Tasks] Fix for Bug 258786
- Date: Mon, 19 Dec 2005 16:19:36 +0530
Hi
Worked on Bug 258786 'Mark Selected Tasks as Complete' active even
after tasks are marked complete...
Please review the patch.
Thanks
Johnny
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2893
diff -u -p -r1.2893 ChangeLog
--- calendar/ChangeLog 19 Dec 2005 08:07:46 -0000 1.2893
+++ calendar/ChangeLog 19 Dec 2005 10:46:18 -0000
@@ -1,3 +1,12 @@
+2005-12-19 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.
+
2005-12-19 Chenthill Palanisamy <pchenthill novell com>
Fixes #324195
Index: calendar/gui/e-cal-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.c,v
retrieving revision 1.18
diff -u -p -r1.18 e-cal-popup.c
--- calendar/gui/e-cal-popup.c 18 Oct 2005 09:58:28 -0000 1.18
+++ calendar/gui/e-cal-popup.c 19 Dec 2005 10:47:21 -0000
@@ -569,8 +569,18 @@ e_cal_popup_target_new_select(ECalPopup
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;
Index: calendar/gui/e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.146
diff -u -p -r1.146 e-calendar-table.c
--- calendar/gui/e-calendar-table.c 17 Dec 2005 13:30:41 -0000 1.146
+++ calendar/gui/e-calendar-table.c 19 Dec 2005 10:47:54 -0000
@@ -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" },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]