aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-client')
-rw-r--r--calendar/cal-client/cal-client.c12
-rw-r--r--calendar/cal-client/cal-client.h3
-rw-r--r--calendar/cal-client/cal-listener.c21
-rw-r--r--calendar/cal-client/cal-listener.h9
4 files changed, 12 insertions, 33 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index bffa12ac65..c7f5302d14 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -281,7 +281,7 @@ cal_client_destroy (GtkObject *object)
/* Handle the cal_loaded signal from the listener */
static void
cal_loaded_cb (CalListener *listener,
- CalListenerLoadStatus status,
+ Evolution_Calendar_Listener_LoadStatus status,
Evolution_Calendar_Cal cal,
gpointer data)
{
@@ -299,7 +299,7 @@ cal_loaded_cb (CalListener *listener,
client_status = CAL_CLIENT_LOAD_ERROR;
switch (status) {
- case CAL_LISTENER_LOAD_SUCCESS:
+ case Evolution_Calendar_Listener_SUCCESS:
CORBA_exception_init (&ev);
cal_copy = CORBA_Object_duplicate (cal, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
@@ -315,14 +315,18 @@ cal_loaded_cb (CalListener *listener,
client_status = CAL_CLIENT_LOAD_SUCCESS;
goto out;
- case CAL_LISTENER_LOAD_ERROR:
+ case Evolution_Calendar_Listener_ERROR:
client_status = CAL_CLIENT_LOAD_ERROR;
goto error;
- case CAL_LISTENER_LOAD_IN_USE:
+ case Evolution_Calendar_Listener_IN_USE:
client_status = CAL_CLIENT_LOAD_IN_USE;
goto error;
+ case Evolution_Calendar_Listener_METHOD_NOT_SUPPORTED:
+ client_status = CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED;
+ goto error;
+
default:
g_assert_not_reached ();
}
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index e03008ca67..e4731980e0 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -43,7 +43,8 @@ typedef struct _CalClientClass CalClientClass;
typedef enum {
CAL_CLIENT_LOAD_SUCCESS,
CAL_CLIENT_LOAD_ERROR,
- CAL_CLIENT_LOAD_IN_USE
+ CAL_CLIENT_LOAD_IN_USE,
+ CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED
} CalClientLoadStatus;
struct _CalClient {
diff --git a/calendar/cal-client/cal-listener.c b/calendar/cal-client/cal-listener.c
index 2c875c4c38..884d64e8f9 100644
--- a/calendar/cal-client/cal-listener.c
+++ b/calendar/cal-client/cal-listener.c
@@ -219,7 +219,6 @@ Listener_cal_loaded (PortableServer_Servant servant,
CalListenerPrivate *priv;
CORBA_Environment aev;
Evolution_Calendar_Cal cal_copy;
- CalListenerLoadStatus load_status;
listener = CAL_LISTENER (bonobo_object_from_servant (servant));
priv = listener->priv;
@@ -241,26 +240,8 @@ Listener_cal_loaded (PortableServer_Servant servant,
priv->cal = cal_copy;
- switch (status) {
- case Evolution_Calendar_Listener_SUCCESS:
- load_status = CAL_LISTENER_LOAD_SUCCESS;
- break;
-
- case Evolution_Calendar_Listener_ERROR:
- load_status = CAL_LISTENER_LOAD_ERROR;
- break;
-
- case Evolution_Calendar_Listener_IN_USE:
- load_status = CAL_LISTENER_LOAD_IN_USE;
- break;
-
- default:
- load_status = CAL_LISTENER_LOAD_ERROR; /* keep gcc happy */
- g_assert_not_reached ();
- }
-
gtk_signal_emit (GTK_OBJECT (listener), cal_listener_signals[CAL_LOADED],
- load_status, cal);
+ status, cal);
}
/* Listener::obj_updated method */
diff --git a/calendar/cal-client/cal-listener.h b/calendar/cal-client/cal-listener.h
index 23590e6ff8..171da0d5c3 100644
--- a/calendar/cal-client/cal-listener.h
+++ b/calendar/cal-client/cal-listener.h
@@ -40,13 +40,6 @@ BEGIN_GNOME_DECLS
typedef struct _CalListener CalListener;
typedef struct _CalListenerClass CalListenerClass;
-/* Load status for the cal_loaded signal. We need better error reporting. */
-typedef enum {
- CAL_LISTENER_LOAD_SUCCESS,
- CAL_LISTENER_LOAD_ERROR,
- CAL_LISTENER_LOAD_IN_USE
-} CalListenerLoadStatus;
-
struct _CalListener {
BonoboObject object;
@@ -60,7 +53,7 @@ struct _CalListenerClass {
/* Notification signals */
void (* cal_loaded) (CalListener *listener,
- CalListenerLoadStatus status,
+ Evolution_Calendar_Listener_LoadStatus status,
Evolution_Calendar_Cal cal);
void (* obj_updated) (CalListener *listener, const Evolution_Calendar_CalObjUID uid);
void (* obj_removed) (CalListener *listener, const Evolution_Calendar_CalObjUID uid);