[evolution-patches] [Fwd: Fixes #58786 [Tasks]]



--- Begin Message ---

 
hi,

the attached patch fixes the bug #58786.


thank you.

-archana.a



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:28:07 -0000
@@ -1,3 +1,11 @@
+2005-03-02  Archana A <archana_a5 rediffmail com>
+	     Shashidhar <shashi_262004 yahoo co in>
+	
+	Fixes #58786
+	* gui/e-calendar-table.c : Use E_CAL_POPUP_SELECT_ENABLE
+	to set the mask for 'Mark as complete'.
+	* gui/e-cal-popup.[ch]: Add a new bitmask E_CAL_POPUP_SELECT_ENABLE
+	and set the flag based on the completion status of the task.
+	
 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:28:07 -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_ENABLE },
 	{ 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:28:07 -0000
@@ -128,8 +128,9 @@ e_cal_popup_target_new_select(ECalPopup 
 	guint32 mask = ~0;
 	ECal *client;
 	gboolean read_only;
-
-	/* FIXME: This is duplicated in e-cal-menu */
+	struct icaltimetype *time_completed = NULL;
+	ECalComponent *comp;
+	/* FIXME: This is duplicated in e-cal-menu  */
 
 	t->model = model;
 	g_object_ref(t->model);
@@ -158,21 +159,24 @@ e_cal_popup_target_new_select(ECalPopup 
 
 		if (e_cal_util_component_is_instance (comp_data->icalcomp))
 			mask &= ~E_CAL_POPUP_SELECT_INSTANCE;
-
+                 
+		comp = e_cal_component_new ();
+		e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
 		if (e_cal_util_component_has_organizer (comp_data->icalcomp)) {
-			ECalComponent *comp;
-
-			comp = e_cal_component_new ();
-			e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
 			if (!itip_organizer_is_user (comp, comp_data->client))
 				mask &= ~E_CAL_POPUP_SELECT_ORGANIZER;
-
-			g_object_unref (comp);
+		
 		} else {
 			/* organiser is synonym for owner in this case */
 			mask &= ~(E_CAL_POPUP_SELECT_ORGANIZER|E_CAL_POPUP_SELECT_NOTMEETING);
 		}
+		
+		e_cal_component_get_completed (comp, &time_completed);
+		if (!time_completed)
+			mask &= ~E_CAL_POPUP_SELECT_ENABLE;
 
+		g_object_unref (comp);	
+	
 		client = comp_data->client;
 	}
 
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:28:07 -0000
@@ -80,6 +80,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_ENABLE = 1<<12,
 };
 
 /**

--- End Message ---


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