From dfdaafa8816cf75e3a9a482c1bcbf4b54c331935 Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Fri, 30 Jan 2009 09:38:57 +0000 Subject: Fix for bug #450554 (bugzilla.novell.com) - Remove all attendees from the list-view and name-selector before populating it on 'event_changed' callback. svn path=/trunk/; revision=37191 --- calendar/gui/dialogs/event-editor.c | 2 ++ calendar/gui/dialogs/event-page.c | 20 ++++++++++++++++++++ calendar/gui/dialogs/event-page.h | 1 + 3 files changed, 23 insertions(+) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index e3d3448f6c..a297765fa6 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -565,6 +565,8 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) } if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) { + event_page_remove_all_attendees (priv->event_page); + for (l = attendees; l != NULL; l = l->next) { ECalComponentAttendee *ca = l->data; EMeetingAttendee *ia; diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index ffbd37d850..d0e6cad470 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -3273,3 +3273,23 @@ event_page_add_attendee (EventPage *epage, EMeetingAttendee *attendee) 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); } + +/** + * event_page_remove_all_attendees + * Removes all attendees from the meeting store and name selector. + * @param epage EventPage. + **/ +void +event_page_remove_all_attendees (EventPage *epage) +{ + EventPagePrivate *priv; + + g_return_if_fail (epage != NULL); + g_return_if_fail (IS_EVENT_PAGE (epage)); + + priv = epage->priv; + + e_meeting_store_remove_all_attendees (priv->model); + e_meeting_list_view_remove_all_attendees_from_name_selector (E_MEETING_LIST_VIEW (priv->list_view)); +} + diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h index 7c868f1d3d..63c0bd2306 100644 --- a/calendar/gui/dialogs/event-page.h +++ b/calendar/gui/dialogs/event-page.h @@ -108,6 +108,7 @@ void event_page_set_view_rvsp (EventPage *epage, ENameSelector * event_page_get_name_selector (EventPage *epage); void event_page_add_attendee (EventPage *epage, EMeetingAttendee *attendee); +void event_page_remove_all_attendees (EventPage *epage); G_END_DECLS -- cgit v1.2.3