aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-05-01 01:50:11 +0800
committerMilan Crha <mcrha@redhat.com>2013-05-01 01:51:05 +0800
commit5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8 (patch)
tree0a95d0822509af2b10ae5368e46414740263f511
parent6ec48e33ef01476246d943d941eb2e022687ef59 (diff)
downloadgsoc2013-evolution-5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8.tar
gsoc2013-evolution-5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8.tar.gz
gsoc2013-evolution-5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8.tar.bz2
gsoc2013-evolution-5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8.tar.lz
gsoc2013-evolution-5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8.tar.xz
gsoc2013-evolution-5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8.tar.zst
gsoc2013-evolution-5bcd2066f486e61d1c4f6d2b4d6e48e3776890d8.zip
Bug #699334 - Calendar: reply all doesn't quite work
-rw-r--r--calendar/gui/itip-utils.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 82dc88a37f..97e582a8db 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 (