aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/itip-utils.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@src.gnome.org>2003-03-05 03:52:37 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-03-05 03:52:37 +0800
commit6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62 (patch)
treebba07b5f28966c10a90de8f550af895014b0b9bb /calendar/gui/itip-utils.c
parentcd4477930e72b1be069d5c97b90d96e989645bfc (diff)
downloadgsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.gz
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.zst
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.zip
If only the pipe wouldn't break.
svn path=/trunk/; revision=20143
Diffstat (limited to 'calendar/gui/itip-utils.c')
-rw-r--r--calendar/gui/itip-utils.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index d64b86ca9c..61298fd4ed 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -82,7 +82,7 @@ itip_addresses_get_default (void)
}
gboolean
-itip_organizer_is_user (CalComponent *comp)
+itip_organizer_is_user (CalComponent *comp, CalClient *client)
{
CalComponentOrganizer organizer;
const char *strip;
@@ -93,7 +93,19 @@ itip_organizer_is_user (CalComponent *comp)
cal_component_get_organizer (comp, &organizer);
if (organizer.value != NULL) {
- strip = itip_strip_mailto (organizer.value);
+
+ strip = itip_strip_mailto (organizer.value);
+
+ if (cal_client_get_static_capability (client, "organizer-not-email-address")) {
+ const char *email;
+
+ email = cal_client_get_email_address (client);
+ if (email && !g_strcasecmp (email, strip))
+ return TRUE;
+
+ return FALSE;
+ }
+
user_org = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
}
@@ -585,7 +597,7 @@ comp_limit_attendees (CalComponent *comp)
}
static void
-comp_sentby (CalComponent *comp)
+comp_sentby (CalComponent *comp, CalClient *client)
{
CalComponentOrganizer organizer;
@@ -605,7 +617,7 @@ comp_sentby (CalComponent *comp)
return;
}
- if (!itip_organizer_is_user (comp) && !itip_sentby_is_user (comp)) {
+ if (!itip_organizer_is_user (comp, client) && !itip_sentby_is_user (comp)) {
EAccount *a = itip_addresses_get_default ();
organizer.value = g_strdup (organizer.value);
@@ -764,14 +776,14 @@ comp_compliant (CalComponentItipMethod method, CalComponent *comp, CalClient *cl
/* Comply with itip spec */
switch (method) {
case CAL_COMPONENT_METHOD_PUBLISH:
- comp_sentby (clone);
+ comp_sentby (clone, client);
cal_component_set_attendee_list (clone, NULL);
break;
case CAL_COMPONENT_METHOD_REQUEST:
- comp_sentby (clone);
+ comp_sentby (clone, client);
break;
case CAL_COMPONENT_METHOD_CANCEL:
- comp_sentby (clone);
+ comp_sentby (clone, client);
break;
case CAL_COMPONENT_METHOD_REPLY:
break;