diff options
author | Milan Crha <mcrha@redhat.com> | 2010-05-28 01:56:54 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-05-28 01:56:54 +0800 |
commit | d90c1d909de432f06c4c93543ce7f3b3b870b9ed (patch) | |
tree | 1b8a4ce8de1f01a4899bda4118a7c80e280fa02f /calendar/gui/dialogs/task-page.c | |
parent | cf5d6aeca5525f4b59111e95f9515dd1dd6d4c81 (diff) | |
download | gsoc2013-evolution-d90c1d909de432f06c4c93543ce7f3b3b870b9ed.tar.gz gsoc2013-evolution-d90c1d909de432f06c4c93543ce7f3b3b870b9ed.tar.zst gsoc2013-evolution-d90c1d909de432f06c4c93543ce7f3b3b870b9ed.zip |
Bug #313791 - Delegator can be repeated when delegating a meeting
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); } |