[evolution-patches] fixes #58786 [ Tasks ]



Hi,
 I've attached the patch which fixes the bug

with regards,
Sharath
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2680
diff -u -p -r1.2680 ChangeLog
--- ChangeLog	1 Mar 2005 01:14:56 -0000	1.2680
+++ ChangeLog	2 Mar 2005 13:37:15 -0000
@@ -1,3 +1,11 @@
+2005-03-02  Praveen kumar K <praveenkumar krishnaiah gmail com>
+	    Sharath M C  <sharathmc gmail com>
+
+	Fixes #58786
+	* gui/e-cal-popup.[ch]: Added flag E_CAL_POPUP_SELECT_COMPLETED
+	(e_cal_popup_target_new_select): masks using flag
+	* gui/e-calendar-table.c: use the flag
+	
 2005-02-28  Harish Krishnaswamy  <kharish novell com>
 
         Fixes #69556
Index: gui/e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.132
diff -u -p -r1.132 e-calendar-table.c
--- gui/e-calendar-table.c	25 Jan 2005 11:18:16 -0000	1.132
+++ gui/e-calendar-table.c	2 Mar 2005 13:37:15 -0000
@@ -1168,7 +1168,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_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_COMPLETED},
 	{ 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_BAR, "c0.bar" },
Index: gui/e-cal-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.c,v
retrieving revision 1.9
diff -u -p -r1.9 e-cal-popup.c
--- gui/e-cal-popup.c	1 Feb 2005 15:51:26 -0000	1.9
+++ gui/e-cal-popup.c	2 Mar 2005 13:37:15 -0000
@@ -139,6 +139,18 @@ e_cal_popup_target_new_select(ECalPopup 
 		client = e_cal_model_get_default_client(t->model);
 	} else {
 		ECalModelComponent *comp_data = (ECalModelComponent *)t->events->pdata[0];
+		ECalComponent *new_comp;
+		icaltimetype *tt;
+		
+		new_comp = e_cal_component_new();		
+		e_cal_component_set_icalcomponent (new_comp, icalcomponent_new_clone (comp_data->icalcomp));
+		e_cal_component_get_completed (new_comp, &tt);
+		if(tt == NULL)
+		{
+			mask &= ~E_CAL_POPUP_SELECT_COMPLETED;
+		}
+		g_object_unref (new_comp);
+		
 
 		mask &= ~E_CAL_POPUP_SELECT_ANY;
 		if (t->events->len == 1)
@@ -176,6 +188,7 @@ e_cal_popup_target_new_select(ECalPopup 
 		client = comp_data->client;
 	}
 
+	
 	e_cal_is_read_only(client, &read_only, NULL);
 	if (!read_only)
 		mask &= ~E_CAL_POPUP_SELECT_EDITABLE;
@@ -277,6 +290,7 @@ static const EPopupHookTargetMask ecalph
 	{ "not-editing", E_CAL_POPUP_SELECT_NOTEDITING },
 	{ "not-meeting", E_CAL_POPUP_SELECT_NOTMEETING },
 	{ "assignable", E_CAL_POPUP_SELECT_ASSIGNABLE },
+	{ "completed", E_CAL_POPUP_SELECT_COMPLETED },
 	{ "hasurl", E_CAL_POPUP_SELECT_HASURL },
 	{ 0 }
 };
Index: gui/e-cal-popup.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.h,v
retrieving revision 1.5
diff -u -p -r1.5 e-cal-popup.h
--- gui/e-cal-popup.h	21 Oct 2004 17:07:23 -0000	1.5
+++ gui/e-cal-popup.h	2 Mar 2005 13:37:15 -0000
@@ -64,6 +64,7 @@ enum _e_cal_popup_target_t {
  * @E_CAL_POPUP_SELECT_NOTMEETING: The event is not a meeting.
  * @E_CAL_POPUP_SELECT_ASSIGNABLE: An assignable task.
  * @E_CAL_POPUP_SELECT_HASURL: A task that contains a URL.
+ * @E_CAL_POPUP_SELECT_COMPLETED: mask value when task completed.
  **/
 enum _e_cal_popup_target_select_t {
 	E_CAL_POPUP_SELECT_ONE = 1<<0,
@@ -80,6 +81,7 @@ enum _e_cal_popup_target_select_t {
 
 	E_CAL_POPUP_SELECT_ASSIGNABLE = 1<<10,
 	E_CAL_POPUP_SELECT_HASURL = 1<<11,
+	E_CAL_POPUP_SELECT_COMPLETED = 1 << 12
 };
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]