diff options
author | Suman Manjunath <msuman@src.gnome.org> | 2009-01-30 17:38:57 +0800 |
---|---|---|
committer | Suman Manjunath <msuman@src.gnome.org> | 2009-01-30 17:38:57 +0800 |
commit | dfdaafa8816cf75e3a9a482c1bcbf4b54c331935 (patch) | |
tree | ce47168a67c21a06e015e15f7e0ad507641c7898 /calendar/gui/e-meeting-list-view.c | |
parent | d4d9c8155982362c95c256e851d14d63f3ee7fbd (diff) | |
download | gsoc2013-evolution-dfdaafa8816cf75e3a9a482c1bcbf4b54c331935.tar.gz gsoc2013-evolution-dfdaafa8816cf75e3a9a482c1bcbf4b54c331935.tar.zst gsoc2013-evolution-dfdaafa8816cf75e3a9a482c1bcbf4b54c331935.zip |
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
Diffstat (limited to 'calendar/gui/e-meeting-list-view.c')
-rw-r--r-- | calendar/gui/e-meeting-list-view.c | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index 9859c65df9..78f87c23f5 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -296,10 +296,8 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, } } else { attendee = e_destination_get_email (des); - if (madd && attendee && g_str_equal (madd, attendee)) { - attendee = e_destination_get_email (des); - e_destination_store_remove_destination (destination_store, des); + e_destination_store_remove_destination (destination_store, des); } } } @@ -307,6 +305,49 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, g_list_free (destinations); } +void +e_meeting_list_view_remove_all_attendees_from_name_selector (EMeetingListView *view) +{ + ENameSelectorModel *name_selector_model; + EMeetingListViewPrivate *priv; + guint i; + + priv = view->priv; + + name_selector_model = e_name_selector_peek_model (priv->name_selector); + + for (i = 0; sections[i] != NULL; i++) { + EDestinationStore *destination_store = NULL; + GList *destinations = NULL, *l = NULL; + + e_name_selector_model_peek_section (name_selector_model, sections[i], + NULL, &destination_store); + if (!destination_store) { + g_warning ("destination store is NULL\n"); + continue; + } + + destinations = e_destination_store_list_destinations (destination_store); + for (l = destinations; l; l = g_list_next (l)) { + EDestination *des = l->data; + + if (e_destination_is_evolution_list (des)) { + GList *m, *dl; + + dl = (GList *)e_destination_list_get_dests (des); + + for (m = dl; m; m = m->next) { + g_object_unref (m->data); + m = g_list_remove (m, l->data); + } + } else { + e_destination_store_remove_destination (destination_store, des); + } + } + g_list_free (destinations); + } +} + static void attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *addresses, GList *names, GtkTreeView *view) { |