[evolution-patches] patch for bug 258786 [Tasks]



Hi,

Attached is the patch to fix bug 
http://bugzilla.gnome.org/show_bug.cgi?id=258786

Thanks,
Viren
Index: gui/e-cal-menu.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-menu.h,v
retrieving revision 1.1
diff -u -p -r1.1 e-cal-menu.h
--- gui/e-cal-menu.h	18 Oct 2004 04:08:47 -0000	1.1
+++ gui/e-cal-menu.h	26 Sep 2005 09:19:37 -0000
@@ -72,6 +72,7 @@ enum _e_cal_menu_target_select_t {
 
 	E_CAL_MENU_SELECT_ASSIGNABLE = 1<<10,
 	E_CAL_MENU_SELECT_HASURL = 1<<11,
+	E_CAL_MENU_SELECT_NOTCOMPLETE = 1<<12,
 };
 
 typedef struct _ECalMenuTargetSelect ECalMenuTargetSelect;
Index: gui/e-cal-menu.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-menu.c,v
retrieving revision 1.4
diff -u -p -r1.4 e-cal-menu.c
--- gui/e-cal-menu.c	2 Aug 2005 13:50:53 -0000	1.4
+++ gui/e-cal-menu.c	26 Sep 2005 09:19:37 -0000
@@ -146,8 +146,11 @@ e_cal_menu_target_new_select(ECalMenu *e
 
 		if (!e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)
 		    && !e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK)
-		    && !icalcomponent_get_first_property (comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY))
+		    && !icalcomponent_get_first_property (comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY)) 
 			mask &= ~E_CAL_MENU_SELECT_ASSIGNABLE;
+		
+		if (!icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY))
+			mask &= ~ E_CAL_MENU_SELECT_NOTCOMPLETE;
 
 		if (e_cal_util_component_has_recurrences (comp_data->icalcomp))
 			mask &= ~E_CAL_MENU_SELECT_RECURRING;
@@ -239,6 +242,7 @@ static const EMenuHookTargetMask ecalph_
 	{ "not-meeting", E_CAL_MENU_SELECT_NOTMEETING },
 	{ "assignable", E_CAL_MENU_SELECT_ASSIGNABLE },
 	{ "hasurl", E_CAL_MENU_SELECT_HASURL },
+	{ "not-complete", E_CAL_MENU_SELECT_NOTCOMPLETE },
 	{ 0 }
 };
 
Index: gui/e-cal-popup.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.h,v
retrieving revision 1.9
diff -u -p -r1.9 e-cal-popup.h
--- gui/e-cal-popup.h	18 Aug 2005 11:20:23 -0000	1.9
+++ gui/e-cal-popup.h	26 Sep 2005 09:19:38 -0000
@@ -85,6 +85,7 @@ enum _e_cal_popup_target_select_t {
 	E_CAL_POPUP_SELECT_MEETING = 1 <<12,
 	E_CAL_POPUP_SELECT_DELEGATABLE = 1<<13,
 	E_CAL_POPUP_SELECT_ACCEPTABLE = 1<<14,
+	E_CAL_POPUP_SELECT_NOTCOMPLETE = 1<<15,
 };
 
 /**
Index: gui/e-cal-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.c,v
retrieving revision 1.16
diff -u -p -r1.16 e-cal-popup.c
--- gui/e-cal-popup.c	24 Aug 2005 03:07:49 -0000	1.16
+++ gui/e-cal-popup.c	26 Sep 2005 09:19:38 -0000
@@ -268,7 +268,10 @@ e_cal_popup_target_new_select(ECalPopup 
 		if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) &&
 				needs_to_accept (comp_data->icalcomp, user_email))
 			mask &= ~E_CAL_POPUP_SELECT_ACCEPTABLE;
-		
+
+		if (!icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY))
+			mask &= ~E_CAL_POPUP_SELECT_NOTCOMPLETE;
+
 		g_object_unref (comp);
 		g_free (user_email);
 	}
@@ -422,6 +425,7 @@ static const EPopupHookTargetMask ecalph
 	{ "hasurl", E_CAL_POPUP_SELECT_HASURL },
 	{ "delegate", E_CAL_POPUP_SELECT_DELEGATABLE }, 
 	{ "accept", E_CAL_POPUP_SELECT_ACCEPTABLE },
+	{ "not-complete", E_CAL_POPUP_SELECT_NOTCOMPLETE },
 	{ 0 }
 };
 
Index: gui/tasks-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-control.c,v
retrieving revision 1.82
diff -u -p -r1.82 tasks-control.c
--- gui/tasks-control.c	2 Aug 2005 13:50:54 -0000	1.82
+++ gui/tasks-control.c	26 Sep 2005 09:19:38 -0000
@@ -169,8 +169,8 @@ static struct _tasks_sensitize_item task
 	{ "TasksCopy", E_CAL_MENU_SELECT_ANY },
 	{ "TasksPaste", E_CAL_MENU_SELECT_EDITABLE },
 	{ "TasksDelete", E_CAL_MENU_SELECT_ANY | E_CAL_MENU_SELECT_EDITABLE },
-	{ "TasksMarkComplete", E_CAL_MENU_SELECT_ANY | E_CAL_MENU_SELECT_EDITABLE },
-	{ "TasksPurge", E_CAL_MENU_SELECT_EDITABLE },
+	{ "TasksMarkComplete", E_CAL_MENU_SELECT_ANY | E_CAL_MENU_SELECT_EDITABLE | E_CAL_MENU_SELECT_NOTCOMPLETE},
+	{ "TasksPurge",  E_CAL_MENU_SELECT_EDITABLE },
 	{ "TasksAssign", E_CAL_MENU_SELECT_ONE | E_CAL_MENU_SELECT_EDITABLE | E_CAL_MENU_SELECT_ASSIGNABLE },
 	{ "TasksForward", E_CAL_MENU_SELECT_ONE },
 	{ 0 }
@@ -439,7 +439,6 @@ tasks_control_purge_cmd	(BonoboUICompone
 	ETasks *tasks;
 
 	tasks = E_TASKS (data);
-	
 	if (confirm_purge (tasks))
 	    e_tasks_delete_completed (tasks);
 }
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2803
diff -u -p -r1.2803 ChangeLog
--- ChangeLog	2 Sep 2005 13:58:02 -0000	1.2803
+++ ChangeLog	26 Sep 2005 09:19:44 -0000
@@ -1,3 +1,11 @@
+2005-09-26  Viren.L  <lviren novell com>
+	Fixes: #258786
+
+	* gui/e-cal-popup.[ch] (e_cal_popup_target_new_select) : Added 
+	E_CAL_POPUP_SELECT_NOTCOMPLETE flag.
+	* gui/e-cal-menu.[ch] (e_cal_menu_target_new_select) : Added 
+	E_CAL_MENU_SELECT_NOTCOMPLETE flag.
+	
 2005-09-01  Dinesh Layek  <ldinesh novell com>
 
 	Fixes #314922, 311694, 314918


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