From 2fe0e9f18fa879a2957e07ff43252d60c21f7b00 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 4 Sep 2002 18:12:28 +0000 Subject: bail out if we couldn't send the cancel 2002-09-04 JP Rosevear * gui/dialogs/event-editor.c (event_editor_send_comp): bail out if we couldn't send the cancel * gui/dialogs/task-editor.c (task_editor_send_comp): ditto * gui/dialogs/comp-editor.c (save_comp_with_send): indicate send status (real_send_comp): return success/fail, only resave the component a if we successfully sent (comp_editor_send_comp): return success/fail * gui/itip-utils.h: update proto * gui/itip-utils.c (itip_send_comp): return true if we sent the message svn path=/trunk/; revision=17966 --- calendar/gui/itip-utils.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'calendar/gui/itip-utils.c') diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 544c9f5e25..e388634e93 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -782,7 +782,7 @@ comp_compliant (CalComponentItipMethod method, CalComponent *comp) return clone; } -void +gboolean itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, CalClient *client, icalcomponent *zones) { @@ -799,12 +799,13 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, GNOME_Evolution_Composer_AttachmentData *attach_data = NULL; char *ical_string; CORBA_Environment ev; + gboolean retval = FALSE; CORBA_exception_init (&ev); /* Obtain an object reference for the Composer. */ bonobo_server = bonobo_object_activate (GNOME_EVOLUTION_COMPOSER_OAFIID, 0); - g_return_if_fail (bonobo_server != NULL); + g_return_val_if_fail (bonobo_server != NULL, FALSE); composer_server = BONOBO_OBJREF (bonobo_server); /* Give the server a chance to manipulate the comp */ @@ -858,10 +859,14 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, GNOME_Evolution_Composer_show (composer_server, &ev); if (BONOBO_EX (&ev)) g_warning ("Unable to show the composer while sending iTip message"); + else + retval = TRUE; } else { GNOME_Evolution_Composer_send (composer_server, &ev); if (BONOBO_EX (&ev)) g_warning ("Unable to send iTip message"); + else + retval = TRUE; } cleanup: @@ -891,5 +896,7 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, CORBA_free (description); if (attach_data != NULL) CORBA_free (attach_data); + + return retval; } -- cgit v1.2.3