aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/task-page.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs/task-page.c')
-rw-r--r--calendar/gui/dialogs/task-page.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index f1b13df8f6..6de55a14e2 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -476,6 +476,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Component for cancellation */
priv->comp = e_cal_component_clone (comp);
+ comp_editor_copy_new_attendees (priv->comp, comp);
/* Clean the screen */
clear_widgets (tpage);
@@ -1001,7 +1002,7 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
if (attendee->sentby)
sentby = itip_strip_mailto (attendee->sentby);
- if ((address && !g_ascii_strcasecmp (ia_address, address)) || (sentby && !g_ascii_strcasecmp (ia_sentby, sentby))) {
+ if ((address && !g_ascii_strcasecmp (ia_address, address)) || (sentby && ia_sentby && !g_ascii_strcasecmp (ia_sentby, sentby))) {
e_cal_component_free_attendee_list (attendees);
return TRUE;
}
@@ -1047,7 +1048,7 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia)
while (ia != NULL) {
EMeetingAttendee *ib = NULL;
- if (existing_attendee (ia, priv->comp)) {
+ if (existing_attendee (ia, priv->comp) && !comp_editor_have_in_new_attendees (priv->comp, ia)) {
g_object_ref (ia);
g_ptr_array_add (priv->deleted_attendees, ia);
}
@@ -1055,6 +1056,7 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia)
if (e_meeting_attendee_get_delto (ia) != NULL)
ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delto (ia), NULL);
+ comp_editor_manage_new_attendees (priv->comp, ia, FALSE);
e_meeting_list_view_remove_attendee_from_name_selector (priv->list_view, ia);
e_meeting_store_remove_attendee (priv->model, ia);
@@ -1148,8 +1150,10 @@ attendee_added_cb (EMeetingListView *emlv,
client = comp_editor_get_client (editor);
flags = comp_editor_get_flags (editor);
- if (!(flags & COMP_EDITOR_DELEGATE))
+ if (!(flags & COMP_EDITOR_DELEGATE)) {
+ comp_editor_manage_new_attendees (priv->comp, ia, TRUE);
return;
+ }
if (existing_attendee (ia, priv->comp))
e_meeting_store_remove_attendee (priv->model, ia);