aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-01-08 04:49:18 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-01-08 04:49:18 +0800
commitb12dec1c48fba6202e9e854f23f1975f8329c0ec (patch)
tree259313b3367fe5fb42320c0c0cdb074ae316af48 /plugins
parent7ebffdce1b5df71cb40b7b86a4d0350971fde788 (diff)
downloadgsoc2013-evolution-b12dec1c48fba6202e9e854f23f1975f8329c0ec.tar
gsoc2013-evolution-b12dec1c48fba6202e9e854f23f1975f8329c0ec.tar.gz
gsoc2013-evolution-b12dec1c48fba6202e9e854f23f1975f8329c0ec.tar.bz2
gsoc2013-evolution-b12dec1c48fba6202e9e854f23f1975f8329c0ec.tar.lz
gsoc2013-evolution-b12dec1c48fba6202e9e854f23f1975f8329c0ec.tar.xz
gsoc2013-evolution-b12dec1c48fba6202e9e854f23f1975f8329c0ec.tar.zst
gsoc2013-evolution-b12dec1c48fba6202e9e854f23f1975f8329c0ec.zip
ensure there is only one attendee in the RSVP even if the user is
2005-01-07 JP Rosevear <jpr@novell.com> * itip-formatter.c (view_response_cb): ensure there is only one attendee in the RSVP even if the user is duplicated svn path=/trunk/; revision=28279
Diffstat (limited to 'plugins')
-rw-r--r--plugins/itip-formatter/ChangeLog5
-rw-r--r--plugins/itip-formatter/itip-formatter.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog
index 6e6c2e1041..ea5c47085f 100644
--- a/plugins/itip-formatter/ChangeLog
+++ b/plugins/itip-formatter/ChangeLog
@@ -1,5 +1,10 @@
2005-01-07 JP Rosevear <jpr@novell.com>
+ * itip-formatter.c (view_response_cb): ensure there is only one
+ attendee in the RSVP even if the user is duplicated
+
+2005-01-07 JP Rosevear <jpr@novell.com>
+
* itip-view.h: protos
* itip-view.c (rsvp_toggled_cb): set comment sensitivity
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 8e22e7d239..03c9b9689a 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -927,7 +927,8 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
icalvalue *value;
const char *attendee, *comment;
GSList *l, *list = NULL;
-
+ gboolean found;
+
comp = e_cal_component_clone (pitip->comp);
if (comp == NULL)
return;
@@ -941,6 +942,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
ical_comp = e_cal_component_get_icalcomponent (comp);
/* Remove all attendees except the one we are responding as */
+ found = FALSE;
for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY))
@@ -955,8 +957,13 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
text = g_strdup (itip_strip_mailto (attendee));
text = g_strstrip (text);
- if (g_strcasecmp (pitip->my_address, text))
+
+ /* We do this to ensure there is at most one
+ * attendee in the response */
+ if (found || g_strcasecmp (pitip->my_address, text))
list = g_slist_prepend (list, prop);
+ else if (!g_strcasecmp (pitip->my_address, text))
+ found = TRUE;
g_free (text);
}