diff options
Diffstat (limited to 'calendar/gui/dialogs/task-page.c')
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 718d45497b..9bb57de918 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1010,7 +1010,7 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp) ECalComponentAttendee *ca; /* Remove the duplicate user from the component if present */ - if (e_meeting_attendee_is_set_delto (ia)) { + if (e_meeting_attendee_is_set_delfrom (ia) || e_meeting_attendee_is_set_delto (ia)) { for (l = attendee_list; l; l = l->next) { ECalComponentAttendee *a = l->data; @@ -1242,24 +1242,20 @@ attendee_added_cb (EMeetingListView *emlv, return; } - if (existing_attendee (ia, priv->comp)) - e_meeting_store_remove_attendee (priv->model, ia); - else { - if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) { - const gchar *delegator_id = e_meeting_attendee_get_delfrom (ia); - EMeetingAttendee *delegator; + /* do not remove here, it did EMeetingListView already */ + e_meeting_attendee_set_delfrom (ia, g_strdup_printf ("MAILTO:%s", priv->user_add ? priv->user_add : "")); - delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL); + if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) { + EMeetingAttendee *delegator; - g_return_if_fail (delegator != NULL); + gtk_widget_set_sensitive (priv->invite, FALSE); + gtk_widget_set_sensitive (priv->add, FALSE); + gtk_widget_set_sensitive (priv->edit, FALSE); - e_meeting_attendee_set_delto (delegator, - g_strdup (e_meeting_attendee_get_address (ia))); + delegator = e_meeting_store_find_attendee (priv->model, priv->user_add, NULL); + g_return_if_fail (delegator != NULL); - gtk_widget_set_sensitive (priv->invite, FALSE); - gtk_widget_set_sensitive (priv->add, FALSE); - gtk_widget_set_sensitive (priv->edit, FALSE); - } + e_meeting_attendee_set_delto (delegator, g_strdup (e_meeting_attendee_get_address (ia))); } } @@ -2156,6 +2152,10 @@ task_page_add_attendee (TaskPage *tpage, EMeetingAttendee *attendee) priv = tpage->priv; + if ((comp_editor_get_flags (comp_editor_page_get_editor (COMP_EDITOR_PAGE (tpage))) & COMP_EDITOR_DELEGATE) != 0) { + e_meeting_attendee_set_delfrom (attendee, g_strdup_printf ("MAILTO:%s", tpage->priv->user_add)); + } + e_meeting_store_add_attendee (priv->model, attendee); e_meeting_list_view_add_attendee_to_name_selector (E_MEETING_LIST_VIEW (priv->list_view), attendee); } |