aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-05-01 01:52:14 +0800
committerMilan Crha <mcrha@redhat.com>2013-05-01 01:52:14 +0800
commita44970217a476c4e5dd732cd0182959ed35b3588 (patch)
tree255ea5f0c4c5142ada74401c7697880d82f48f86
parent00ba61f17f89eb55e77bc992e9fc32a634c56947 (diff)
downloadgsoc2013-evolution-a44970217a476c4e5dd732cd0182959ed35b3588.tar
gsoc2013-evolution-a44970217a476c4e5dd732cd0182959ed35b3588.tar.gz
gsoc2013-evolution-a44970217a476c4e5dd732cd0182959ed35b3588.tar.bz2
gsoc2013-evolution-a44970217a476c4e5dd732cd0182959ed35b3588.tar.lz
gsoc2013-evolution-a44970217a476c4e5dd732cd0182959ed35b3588.tar.xz
gsoc2013-evolution-a44970217a476c4e5dd732cd0182959ed35b3588.tar.zst
gsoc2013-evolution-a44970217a476c4e5dd732cd0182959ed35b3588.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 8ea7fe9d90..e07c3fb352 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 (