diff options
author | JP Rosevear <jpr@ximian.com> | 2001-07-12 07:46:52 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-07-12 07:46:52 +0800 |
commit | 188ec0d0254b5f1e6fa1f98e70f5ad0990184490 (patch) | |
tree | 2edc3f1928a6f3ab37474763791e9ca11516270b /calendar/gui/itip-utils.c | |
parent | e118c5cdbc09918fc648dd63d6f3c02cdcdfcdc2 (diff) | |
download | gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar.gz gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.tar.zst gsoc2013-evolution-188ec0d0254b5f1e6fa1f98e70f5ad0990184490.zip |
be careful about adding and stripping MAILTO:'s properly
2001-07-11 JP Rosevear <jpr@ximian.com>
* gui/dialogs/meeting-page.c: be careful about adding and
stripping MAILTO:'s properly
* gui/dialogs/meeting-page.etspec: add missing columns
* gui/itip-utils.c (itip_strip_mailto): point to the real start of
the email address
* gui/itip-utils.h: add proto
* gui/itip-control-factory.c: get rid of the my address property
* gui/e-itip-control.c: use the users real identity to figure out
which attendee they are
(find_my_address): figure out who the user is among the attendees
* gui/e-itip-control.h: remove protos
* gui/dialogs/Makefile.am: extra dist etspecs
* gui/Makefile.am: ditto
svn path=/trunk/; revision=11020
Diffstat (limited to 'calendar/gui/itip-utils.c')
-rw-r--r-- | calendar/gui/itip-utils.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 5c0f040812..3108264163 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -31,6 +31,7 @@ #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog-util.h> #include <gtk/gtkwidget.h> +#include <gal/util/e-util.h> #include <ical.h> #include <Evolution-Composer.h> #include "itip-utils.h" @@ -146,6 +147,21 @@ itip_addresses_free (GList *addresses) g_list_free (addresses); } +const gchar * +itip_strip_mailto (const gchar *address) +{ + const gchar *text; + + if (address == NULL) + return NULL; + + text = e_strstrcase (address, "mailto:"); + if (text != NULL && strlen (address) > 7) + address += 7; + + return address; +} + void itip_send_comp (CalComponentItipMethod method, CalComponent *comp) { @@ -174,11 +190,6 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *comp) composer_server = BONOBO_OBJREF (bonobo_server); switch (method) { - case CAL_COMPONENT_METHOD_PUBLISH: - to_list = GNOME_Evolution_Composer_RecipientList__alloc (); - to_list->_maximum = to_list->_length = 0; - break; - case CAL_COMPONENT_METHOD_REQUEST: case CAL_COMPONENT_METHOD_CANCEL: cal_component_get_attendee_list (comp, &attendees); @@ -191,13 +202,14 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *comp) for (cntr = 0, l = attendees; cntr < len; cntr++, l = l->next) { CalComponentAttendee *att = l->data; + gchar *real; recipient = &(to_list->_buffer[cntr]); if (att->cn) recipient->name = CORBA_string_dup (att->cn); else recipient->name = CORBA_string_dup (""); - recipient->address = CORBA_string_dup (att->value); + recipient->address = CORBA_string_dup (itip_strip_mailto (att->value)); } break; @@ -226,6 +238,11 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *comp) recipient->name = CORBA_string_dup (""); recipient->address = CORBA_string_dup (organizer.value); break; + + default: + to_list = GNOME_Evolution_Composer_RecipientList__alloc (); + to_list->_maximum = to_list->_length = 0; + break; } cc_list = GNOME_Evolution_Composer_RecipientList__alloc (); |