Re: [evolution-patches] 61555 Being too liberal sending cancellation notices
- From: JP Rosevear <jpr novell com>
- To: evolution-patches ximian com
- Subject: Re: [evolution-patches] 61555 Being too liberal sending cancellation notices
- Date: Tue, 10 Aug 2004 11:38:55 -0400
On Tue, 2004-08-10 at 11:21 -0400, JP Rosevear wrote:
> The particular case had an empty address so the mail was not sent
> properly, this corrects the more general case about sending
> cancellations to people who could have never gotten an invitation in the
> first place.
The actual patch...
-JP
--
JP Rosevear <jpr novell com>
Novell, Inc.
? 61555.patch
? 62021.patch
? 62452.patch
? editable.patch
? invitations.patch
? recur-dialog.patch
? repeat-load.patch
? gui/scroll.patch
? gui/select-auto.patch
? gui/select.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2481
diff -u -r1.2481 ChangeLog
--- ChangeLog 10 Aug 2004 14:14:43 -0000 1.2481
+++ ChangeLog 10 Aug 2004 15:22:36 -0000
@@ -1,3 +1,12 @@
+2004-08-10 JP Rosevear <jpr ximian com>
+
+ Fixes #61555
+
+ * gui/dialogs/meeting-page.c (existing_attendee): check if an
+ attendee was pre-existing
+ (remove_attendee): only add the attendee to the cancel comp if it
+ was pre-existing
+
2004-08-10 Rodrigo Moya <rodrigo novell com>
* gui/alarm-notify/alarm-queue.c (tray_icon_destroyed_cb): disconnect
Index: gui/dialogs/meeting-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/meeting-page.c,v
retrieving revision 1.87
diff -u -r1.87 meeting-page.c
--- gui/dialogs/meeting-page.c 26 Jul 2004 17:50:48 -0000 1.87
+++ gui/dialogs/meeting-page.c 10 Aug 2004 15:22:36 -0000
@@ -602,6 +602,32 @@
e_meeting_list_view_edit (mpage->priv->list_view, attendee);
}
+static gboolean
+existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
+{
+ GSList *attendees, *l;
+ const gchar *ia_address;
+
+ ia_address = itip_strip_mailto (e_meeting_attendee_get_address (ia));
+ if (!ia_address)
+ return FALSE;
+
+ e_cal_component_get_attendee_list (comp, &attendees);
+
+ for (l = attendees; l; l = l->next) {
+ ECalComponentAttendee *attendee = l->data;
+ const char *address;
+
+ address = itip_strip_mailto (attendee->value);
+ if (address && !g_strcasecmp (ia_address, address))
+ return TRUE;
+ }
+
+ e_cal_component_free_attendee_list (attendees);
+
+ return FALSE;
+}
+
static void
remove_attendee (MeetingPage *mpage, EMeetingAttendee *ia)
{
@@ -610,8 +636,8 @@
priv = mpage->priv;
- /* If the user deletes the attendee explicitly, assume they no
- longer want the organizer showing up */
+ /* If the user deletes the organizer attendee explicitly,
+ assume they no longer want the organizer showing up */
if (ia == priv->ia) {
g_object_unref (priv->ia);
priv->ia = NULL;
@@ -632,12 +658,15 @@
while (ia != NULL) {
EMeetingAttendee *ib = NULL;
- g_object_ref (ia);
- g_ptr_array_add (priv->deleted_attendees, ia);
- e_meeting_store_remove_attendee (priv->model, ia);
-
+ if (existing_attendee (ia, priv->comp)) {
+ g_object_ref (ia);
+ g_ptr_array_add (priv->deleted_attendees, ia);
+ }
+
if (e_meeting_attendee_get_delto (ia) != NULL)
ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delto (ia), NULL);
+ e_meeting_store_remove_attendee (priv->model, ia);
+
ia = ib;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]