aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/itip-utils.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-07-27 23:34:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-11 07:03:52 +0800
commit5e5e1de764de6b705c12275dc652b1a36ba98fdd (patch)
treeb2f2565e0e363fc7530bb06b81344ae5b483d8ec /calendar/gui/itip-utils.c
parentb5887b88e919066567281ee1224b909c4c5d4634 (diff)
downloadgsoc2013-evolution-5e5e1de764de6b705c12275dc652b1a36ba98fdd.tar
gsoc2013-evolution-5e5e1de764de6b705c12275dc652b1a36ba98fdd.tar.gz
gsoc2013-evolution-5e5e1de764de6b705c12275dc652b1a36ba98fdd.tar.bz2
gsoc2013-evolution-5e5e1de764de6b705c12275dc652b1a36ba98fdd.tar.lz
gsoc2013-evolution-5e5e1de764de6b705c12275dc652b1a36ba98fdd.tar.xz
gsoc2013-evolution-5e5e1de764de6b705c12275dc652b1a36ba98fdd.tar.zst
gsoc2013-evolution-5e5e1de764de6b705c12275dc652b1a36ba98fdd.zip
Bug #420513 - Be able to notify about meeting only new attendees
Diffstat (limited to 'calendar/gui/itip-utils.c')
-rw-r--r--calendar/gui/itip-utils.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index cd0a64f1c8..08389aff08 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -35,6 +35,7 @@
#include "calendar-config.h"
#include "itip-utils.h"
#include <time.h>
+#include "dialogs/comp-editor-util.h"
#include <composer/e-msg-composer.h>
#include <camel/camel-mime-filter-tohtml.h>
@@ -427,7 +428,7 @@ comp_from (ECalComponentItipMethod method, ECalComponent *comp)
}
static EDestination **
-comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users, gboolean reply_all)
+comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users, gboolean reply_all, const GSList *only_attendees)
{
ECalComponentOrganizer organizer;
GSList *attendees, *l;
@@ -482,6 +483,8 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
else if (att->status == ICAL_PARTSTAT_DELEGATED && (att->delto && *att->delto)
&& !(att->rsvp) && method == E_CAL_COMPONENT_METHOD_REQUEST)
continue;
+ else if (only_attendees && !comp_editor_have_in_new_attendees_lst (only_attendees, itip_strip_mailto (att->value)))
+ continue;
destination = e_destination_new ();
if (att->cn != NULL)
@@ -513,6 +516,8 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
if (att->cutype != ICAL_CUTYPE_INDIVIDUAL && att->cutype != ICAL_CUTYPE_GROUP)
continue;
+ else if (only_attendees && !comp_editor_have_in_new_attendees_lst (only_attendees, itip_strip_mailto (att->value)))
+ continue;
destination = e_destination_new ();
if (att->cn != NULL)
@@ -1197,7 +1202,8 @@ append_cal_attachments (EMsgComposer *composer,
gboolean
itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
- ECal *client, icalcomponent *zones, GSList *attachments_list, GList *users, gboolean strip_alarms)
+ ECal *client, icalcomponent *zones, GSList *attachments_list, GList *users,
+ gboolean strip_alarms, gboolean only_new_attendees)
{
EMsgComposer *composer;
EComposerHeaderTable *table;
@@ -1236,7 +1242,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
goto cleanup;
/* Recipients */
- destinations = comp_to_list (method, comp, users, FALSE);
+ destinations = comp_to_list (method, comp, users, FALSE, only_new_attendees ? g_object_get_data (G_OBJECT (send_comp), "new-attendees") : NULL);
if (method != E_CAL_COMPONENT_METHOD_PUBLISH) {
if (destinations == NULL) {
/* We sent them all via the server */
@@ -1350,7 +1356,7 @@ reply_to_calendar_comp (ECalComponentItipMethod method,
goto cleanup;
/* Recipients */
- destinations = comp_to_list (method, comp, users, reply_all);
+ destinations = comp_to_list (method, comp, users, reply_all, NULL);
/* Subject information */
subject = comp_subject (method, comp);