diff options
author | JP Rosevear <jpr@ximian.com> | 2002-09-05 00:19:21 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-09-05 00:19:21 +0800 |
commit | f768bddb9325e7784477bcbcef0bce2a466a635a (patch) | |
tree | 7a5223bc31dc49e046ea4b41e0c3da35467b282c /calendar/gui | |
parent | ddaa0af2ceba5de217424eeddfa3f650049ddfa1 (diff) | |
download | gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.gz gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.bz2 gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.lz gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.xz gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.zst gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.zip |
provide error message param, give a dialog with the message if we get a
2002-09-04 JP Rosevear <jpr@ximian.com>
* gui/itip-utils.c (comp_server_send): provide error message
param, give a dialog with the message if we get a busy result;
return TRUE if we succeed
(itip_send_comp): bail out if we had a problem sending via the
server
* cal-client/cal-client.c (cal_client_send_object): pass back
error message if we get the busy exception in the new param
* cal-client/cal-client.h: update proto
* pcs/cal.c (impl_Cal_send_object): dump backend error message
into Busy exception
* pcs/cal-backend.h: update proto
* pcs/cal-backend.c (cal_backend_send_object): take/pass new error
message parameter
* pcs/cal-backend-file.c (cal_backend_file_send_object): take new param
* idl/evolution-calendar.idl: add errorMsg to Busy exception
svn path=/trunk/; revision=17964
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/itip-utils.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index c6af6989ba..544c9f5e25 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -521,15 +521,17 @@ comp_content_type (CalComponent *comp, CalComponentItipMethod method) } -static GList * -comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient *client, icalcomponent *zones) +static gboolean +comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient *client, + icalcomponent *zones, GList **users) { - CalClientResult result; + CalClientSendResult result; icalcomponent *top_level, *new_top_level = NULL; - GList *users = NULL; + char error_msg[256]; + gboolean retval = FALSE; top_level = comp_toplevel_with_zones (method, comp, client, zones); - result = cal_client_send_object (client, top_level, &new_top_level, &users); + result = cal_client_send_object (client, top_level, &new_top_level, users, error_msg); if (result == CAL_CLIENT_SEND_SUCCESS) { icalcomponent *ical_comp; @@ -538,11 +540,17 @@ comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient * icalcomponent_remove_component (new_top_level, ical_comp); cal_component_set_icalcomponent (comp, ical_comp); icalcomponent_free (new_top_level); + + retval = TRUE; + } else if (result == CAL_CLIENT_SEND_BUSY) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, error_msg); + + retval = FALSE; } icalcomponent_free (top_level); - return users; + return retval; } static gboolean @@ -800,7 +808,8 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, composer_server = BONOBO_OBJREF (bonobo_server); /* Give the server a chance to manipulate the comp */ - users = comp_server_send (method, send_comp, client, zones); + if (!comp_server_send (method, send_comp, client, zones, &users)) + goto cleanup; /* Tidy up the comp */ comp = comp_compliant (method, send_comp); |