[evolution/gnome-3-8] Bug #699334 - Calendar: reply all doesn't quite work
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-8] Bug #699334 - Calendar: reply all doesn't quite work
- Date: Tue, 30 Apr 2013 17:52:46 +0000 (UTC)
commit a44970217a476c4e5dd732cd0182959ed35b3588
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 30 19:52:14 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 8ea7fe9..e07c3fb 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -723,7 +723,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;
@@ -770,19 +771,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)
@@ -800,6 +820,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));
@@ -836,7 +858,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]