Re: [evolution-patches] fix for the bug #73508 [calendar]



Hi,
  Have added a new function for checking the capability. Have attached
the modified patch.

thanks, chenthill.

On Tue, 2005-03-22 at 11:59 +0100, Rodrigo Moya wrote:
> On Mon, 2005-03-21 at 22:20 +0530, chenthill wrote:
> > Hi,
> >   For the groupwise calendar, the organizer should also accept the
> > meeting, so set the status to NEEDSACTION checking the static capability
> > while creating the meeting request.
> > 
> looks good, although, in the e-d-s part, we should have a
> e_cal_get_organizer_must_accept function, as we do for the other
> capabilities. Although, as this is an API addition, that should only be
> committed to HEAD.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2697
diff -u -p -r1.2697 ChangeLog
--- ChangeLog	21 Mar 2005 15:34:37 -0000	1.2697
+++ ChangeLog	22 Mar 2005 14:28:42 -0000
@@ -1,9 +1,8 @@
 2005-03-21  Chenthill Palanisamy  <pchenthill novell com>
 
-	Fixes #73031
-	* gui/dialogs/event-editor.c: (event_editor_finalize):
-	* gui/dialogs/task-editor.c: (task_editor_finalize): Added
-	a check for the presence of the object before unreffing it.
+	Fixes #73508
+	* gui/dialogs/meeting-page.c: (meeting_page_fill_widgets): Set the 
+	organizers status as NEEDS ACTION, checking for the static capability.
 
 2005-03-21  JP Rosevear  <jpr novell com> 
  
Index: gui/dialogs/meeting-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/meeting-page.c,v
retrieving revision 1.95
diff -u -p -r1.95 meeting-page.c
--- gui/dialogs/meeting-page.c	31 Dec 2004 16:59:18 -0000	1.95
+++ gui/dialogs/meeting-page.c	22 Mar 2005 14:28:44 -0000
@@ -397,7 +397,10 @@ meeting_page_fill_widgets (CompEditorPag
 
 			e_meeting_attendee_set_address (priv->ia, g_strdup_printf ("MAILTO:%s", a->id->address));
 			e_meeting_attendee_set_cn (priv->ia, g_strdup (a->id->name));
-			e_meeting_attendee_set_status (priv->ia, ICAL_PARTSTAT_ACCEPTED);
+			if (page->client && e_cal_get_organizer_must_accept (page->client))
+				e_meeting_attendee_set_status (priv->ia, ICAL_PARTSTAT_NEEDSACTION);
+			else
+				e_meeting_attendee_set_status (priv->ia, ICAL_PARTSTAT_ACCEPTED);
 		}
 	}
 	
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.440
diff -u -p -r1.440 ChangeLog
--- ChangeLog	15 Mar 2005 01:48:03 -0000	1.440
+++ ChangeLog	22 Mar 2005 14:35:52 -0000
@@ -1,3 +1,14 @@
+2005-03-22  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #73508
+	* backends/groupwise/e-cal-backend-groupwise.c:
+	(e_cal_backend_groupwise_get_static_capabilities):
+	* libecal/e-cal-util.h: Added a new static capability 
+	to check and set the partstat as NEEDS ACTION for the
+	organizer.
+	* libecal/e-cal.[ch] (e_cal_get_organizer_must_accept):
+	Added a function to check the static capability.
+
 2005-03-12  Chenthill Palanisamy  <pchenthill novell com>
 
 	* backends/groupwise/e-cal-backend-groupwise.c:
Index: libecal/e-cal.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.h,v
retrieving revision 1.22
diff -u -p -r1.22 e-cal.h
--- libecal/e-cal.h	28 Jan 2005 13:17:36 -0000	1.22
+++ libecal/e-cal.h	22 Mar 2005 14:35:53 -0000
@@ -128,6 +128,7 @@ gboolean e_cal_get_one_alarm_only (ECal 
 gboolean e_cal_get_organizer_must_attend (ECal *ecal);
 gboolean e_cal_get_save_schedules (ECal *ecal);
 gboolean e_cal_get_static_capability (ECal *ecal, const char *cap);
+gboolean e_cal_get_organizer_must_accept (ECal *ecal);
 
 gboolean e_cal_set_mode (ECal *ecal, CalMode mode);
 
Index: libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.96
diff -u -p -r1.96 e-cal.c
--- libecal/e-cal.c	15 Mar 2005 01:48:03 -0000	1.96
+++ libecal/e-cal.c	22 Mar 2005 14:35:55 -0000
@@ -2307,6 +2307,15 @@ e_cal_get_save_schedules (ECal *ecal)
 	return check_capability (ecal, CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
 }
 
+gboolean 
+e_cal_get_organizer_must_accept (ECal *ecal)
+{
+	g_return_val_if_fail (ecal != NULL, FALSE);
+	g_return_val_if_fail (E_IS_CAL (ecal), FALSE);
+
+	return check_capability (ecal, CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT);
+}
+
 gboolean
 e_cal_set_mode (ECal *ecal, CalMode mode)
 {
Index: libecal/e-cal-util.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-util.h,v
retrieving revision 1.6
diff -u -p -r1.6 e-cal-util.h
--- libecal/e-cal-util.h	15 Dec 2004 09:08:04 -0000	1.6
+++ libecal/e-cal-util.h	22 Mar 2005 14:35:55 -0000
@@ -125,6 +125,7 @@ gboolean e_cal_util_event_dates_match (i
 #define CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR		  "no-conv-to-recur"
 #define CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS		  "no-general-options"
 #define CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS		  "require-send-options"
+#define CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT      "organizer-must-accept"
 
 /* Recurrent events. Management for instances */
 icalcomponent *e_cal_util_construct_instance (icalcomponent *icalcomp,
Index: backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.139
diff -u -p -r1.139 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	14 Mar 2005 05:19:44 -0000	1.139
+++ backends/groupwise/e-cal-backend-groupwise.c	22 Mar 2005 14:35:57 -0000
@@ -764,6 +764,7 @@ e_cal_backend_groupwise_get_static_capab
 				  CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK "," \
 				  CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR "," \
 				  CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS "," \
+				  CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT "," \
 				  CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
 
 	return GNOME_Evolution_Calendar_Success;


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