aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-meeting-list-view.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-11-04 20:01:11 +0800
committerMilan Crha <mcrha@redhat.com>2009-11-04 20:01:11 +0800
commit62c105cfab0cbeba77ab2b2a14afe7546d6703a0 (patch)
treec9508f086da4ccae1eb720ebe109d0cb8799aad3 /calendar/gui/e-meeting-list-view.c
parent7d66ca379652ce979da24ed18315c76a4a6865ec (diff)
downloadgsoc2013-evolution-62c105cfab0cbeba77ab2b2a14afe7546d6703a0.tar
gsoc2013-evolution-62c105cfab0cbeba77ab2b2a14afe7546d6703a0.tar.gz
gsoc2013-evolution-62c105cfab0cbeba77ab2b2a14afe7546d6703a0.tar.bz2
gsoc2013-evolution-62c105cfab0cbeba77ab2b2a14afe7546d6703a0.tar.lz
gsoc2013-evolution-62c105cfab0cbeba77ab2b2a14afe7546d6703a0.tar.xz
gsoc2013-evolution-62c105cfab0cbeba77ab2b2a14afe7546d6703a0.tar.zst
gsoc2013-evolution-62c105cfab0cbeba77ab2b2a14afe7546d6703a0.zip
Bug #596827 - Don't remove meeting attendees after edit
Diffstat (limited to 'calendar/gui/e-meeting-list-view.c')
-rw-r--r--calendar/gui/e-meeting-list-view.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 980370e3af..0e48f7cb32 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -358,6 +358,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
if (g_list_length (addresses) > 1) {
EMeetingAttendee *attendee;
GList *l, *m;
+ gboolean can_remove = TRUE;
for (l = addresses, m = names; l && m; l = l->next, m = m->next) {
gchar *name = m->data, *email = l->data;
@@ -365,8 +366,12 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
if (!((name && *name) || (email && *email)))
continue;
- if (e_meeting_store_find_attendee (model, email, NULL) != NULL)
+ attendee = e_meeting_store_find_attendee (model, email, NULL);
+ if (attendee != NULL) {
+ if (attendee == existing_attendee)
+ can_remove = FALSE;
continue;
+ }
attendee = e_meeting_store_add_attendee_with_defaults (model);
e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (gchar *)l->data));
@@ -382,7 +387,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
e_meeting_list_view_add_attendee_to_name_selector (E_MEETING_LIST_VIEW (view), attendee);
}
- if (existing_attendee) {
+ if (existing_attendee && can_remove) {
removed = TRUE;
e_meeting_list_view_remove_attendee_from_name_selector (E_MEETING_LIST_VIEW (view),
existing_attendee);