aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-09-05 00:19:21 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-09-05 00:19:21 +0800
commitf768bddb9325e7784477bcbcef0bce2a466a635a (patch)
tree7a5223bc31dc49e046ea4b41e0c3da35467b282c /calendar/pcs
parentddaa0af2ceba5de217424eeddfa3f650049ddfa1 (diff)
downloadgsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.gz
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/pcs')
-rw-r--r--calendar/pcs/cal-backend-file.c5
-rw-r--r--calendar/pcs/cal-backend.c4
-rw-r--r--calendar/pcs/cal-backend.h6
-rw-r--r--calendar/pcs/cal.c8
4 files changed, 15 insertions, 8 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 9b531412e8..f4992f2952 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -126,7 +126,8 @@ static CalBackendResult cal_backend_file_remove_object (CalBackend *backend, con
static CalBackendSendResult cal_backend_file_send_object (CalBackend *backend,
const char *calobj, gchar **new_calobj,
- GNOME_Evolution_Calendar_UserList **user_list);
+ GNOME_Evolution_Calendar_UserList **user_list,
+ char error_msg[256]);
static icaltimezone* cal_backend_file_get_timezone (CalBackend *backend, const char *tzid);
static icaltimezone* cal_backend_file_get_default_timezone (CalBackend *backend);
@@ -1904,7 +1905,7 @@ cal_backend_file_remove_object (CalBackend *backend, const char *uid)
static CalBackendSendResult
cal_backend_file_send_object (CalBackend *backend, const char *calobj, char **new_calobj,
- GNOME_Evolution_Calendar_UserList **user_list)
+ GNOME_Evolution_Calendar_UserList **user_list, char error_msg[256])
{
*new_calobj = g_strdup (calobj);
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c
index 02254f07c5..0954c53472 100644
--- a/calendar/pcs/cal-backend.c
+++ b/calendar/pcs/cal-backend.c
@@ -712,14 +712,14 @@ cal_backend_remove_object (CalBackend *backend, const char *uid)
CalBackendSendResult
cal_backend_send_object (CalBackend *backend, const char *calobj, char **new_calobj,
- GNOME_Evolution_Calendar_UserList **user_list)
+ GNOME_Evolution_Calendar_UserList **user_list, char error_msg[256])
{
g_return_val_if_fail (backend != NULL, CAL_BACKEND_SEND_INVALID_OBJECT);
g_return_val_if_fail (IS_CAL_BACKEND (backend), CAL_BACKEND_SEND_INVALID_OBJECT);
g_return_val_if_fail (calobj != NULL, CAL_BACKEND_SEND_INVALID_OBJECT);
g_assert (CLASS (backend)->send_object != NULL);
- return (* CLASS (backend)->send_object) (backend, calobj, new_calobj, user_list);
+ return (* CLASS (backend)->send_object) (backend, calobj, new_calobj, user_list, error_msg);
}
/**
diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h
index 69efb86c1a..737a1604e8 100644
--- a/calendar/pcs/cal-backend.h
+++ b/calendar/pcs/cal-backend.h
@@ -133,7 +133,8 @@ struct _CalBackendClass {
CalBackendResult (* remove_object) (CalBackend *backend, const char *uid);
CalBackendSendResult (* send_object) (CalBackend *backend, const char *calobj, char **new_calobj,
- GNOME_Evolution_Calendar_UserList **user_list);
+ GNOME_Evolution_Calendar_UserList **user_list,
+ char error_msg[256]);
/* Timezone related virtual methods */
icaltimezone *(* get_timezone) (CalBackend *backend, const char *tzid);
@@ -195,7 +196,8 @@ CalBackendResult cal_backend_update_objects (CalBackend *backend, const char *ca
CalBackendResult cal_backend_remove_object (CalBackend *backend, const char *uid);
CalBackendSendResult cal_backend_send_object (CalBackend *backend, const char *calobj, char **new_calobj,
- GNOME_Evolution_Calendar_UserList **user_list);
+ GNOME_Evolution_Calendar_UserList **user_list,
+ char error_msg[256]);
icaltimezone* cal_backend_get_timezone (CalBackend *backend, const char *tzid);
icaltimezone* cal_backend_get_default_timezone (CalBackend *backend);
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index 3abff9cf98..321a7c23db 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -452,12 +452,14 @@ impl_Cal_send_object (PortableServer_Servant servant,
CalPrivate *priv;
CORBA_char *calobj_copy;
char *new_calobj;
+ GNOME_Evolution_Calendar_Cal_Busy *err;
CalBackendSendResult result;
+ char error_msg[256];
cal = CAL (bonobo_object_from_servant (servant));
priv = cal->priv;
- result = cal_backend_send_object (priv->backend, calobj, &new_calobj, user_list);
+ result = cal_backend_send_object (priv->backend, calobj, &new_calobj, user_list, error_msg);
switch (result) {
case CAL_BACKEND_SEND_SUCCESS:
calobj_copy = CORBA_string_dup (new_calobj);
@@ -470,7 +472,9 @@ impl_Cal_send_object (PortableServer_Servant servant,
break;
case CAL_BACKEND_SEND_BUSY:
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_Busy);
+ err = GNOME_Evolution_Calendar_Cal_Busy__alloc ();
+ err->errorMsg = CORBA_string_dup (error_msg);
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Calendar_Cal_Busy, err);
break;
case CAL_BACKEND_SEND_PERMISSION_DENIED: