[evolution] Bug #699334 - Calendar: reply all doesn't quite work
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #699334 - Calendar: reply all doesn't quite work
- Date: Tue, 30 Apr 2013 17:51:20 +0000 (UTC)
commit 5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 30 19:50:11 2013 +0200
Bug #699334 - Calendar: reply all doesn't quite work
calendar/gui/itip-utils.c | 33 ++++++++++++++++++++++++++++-----
1 files changed, 28 insertions(+), 5 deletions(-)
---
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 82dc88a..97e582a 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -720,7 +720,8 @@ comp_to_list (ESourceRegistry *registry,
* invite will be sent to the resources as well. */
if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
att->cutype != ICAL_CUTYPE_GROUP &&
- att->cutype != ICAL_CUTYPE_RESOURCE)
+ att->cutype != ICAL_CUTYPE_RESOURCE &&
+ att->cutype != ICAL_CUTYPE_UNKNOWN)
continue;
else if (users_has_attendee (users, att->value))
continue;
@@ -767,19 +768,38 @@ comp_to_list (ESourceRegistry *registry,
array = g_ptr_array_new ();
- e_cal_component_get_organizer (comp, &organizer);
sender = itip_get_comp_attendee (registry, comp, NULL);
+ e_cal_component_get_organizer (comp, &organizer);
+ if (organizer.value && (!sender || g_ascii_strcasecmp (
+ itip_strip_mailto (organizer.value), sender) != 0)) {
+ destination = e_destination_new ();
+ e_destination_set_email (destination,
+ itip_strip_mailto (organizer.value));
+ if (organizer.cn)
+ e_destination_set_name (destination, organizer.cn);
+ g_ptr_array_add (array, destination);
+ }
+
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *att = l->data;
- if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
- att->cutype != ICAL_CUTYPE_GROUP)
+ if (!att->value)
+ continue;
+ else if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
+ att->cutype != ICAL_CUTYPE_GROUP &&
+ att->cutype != ICAL_CUTYPE_UNKNOWN)
continue;
else if (only_attendees &&
!comp_editor_have_in_new_attendees_lst (
only_attendees, itip_strip_mailto (att->value)))
continue;
+ else if (organizer.value &&
+ g_ascii_strcasecmp (att->value, organizer.value) == 0)
+ continue;
+ else if (sender && g_ascii_strcasecmp (
+ itip_strip_mailto (att->value), sender) == 0)
+ continue;
destination = e_destination_new ();
if (att->cn != NULL)
@@ -797,6 +817,8 @@ comp_to_list (ESourceRegistry *registry,
destination = e_destination_new ();
e_cal_component_get_organizer (comp, &organizer);
+ if (organizer.cn)
+ e_destination_set_name (destination, organizer.cn);
if (organizer.value)
e_destination_set_email (
destination, itip_strip_mailto (organizer.value));
@@ -833,7 +855,8 @@ comp_to_list (ESourceRegistry *registry,
ECalComponentAttendee *att = l->data;
if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
- att->cutype != ICAL_CUTYPE_GROUP)
+ att->cutype != ICAL_CUTYPE_GROUP &&
+ att->cutype != ICAL_CUTYPE_UNKNOWN)
continue;
if (!g_ascii_strcasecmp (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]