From 3a868a57bb55512cf7315b3178d9557d6350be32 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 16 May 2002 18:04:00 +0000 Subject: added support for CAL_CLIENT_OPEN_PERMISSION_DENIED error code. 2002-05-16 Rodrigo Moya * gui/gnome-cal.c (client_cal_opened_cb): added support for CAL_CLIENT_OPEN_PERMISSION_DENIED error code. (permission_error): new function to display 'Permission Denied' error message when opening the calendar. * gui/e-tasks.c: likewise. * idl/evolution-calendar.idl: added PERMISSION_DENIED to Listener's OpenStatus enumeration. * cal-client/cal-client.c (cal_opened_cb): added code for retrieving 'Permission Denied' errors, and convert it to CalClientOpenStatus values. * pcs/cal-factory.c (open_backend): added code for informing of 'Permission Denied' errors. svn path=/trunk/; revision=16933 --- calendar/pcs/cal-factory.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'calendar/pcs/cal-factory.c') diff --git a/calendar/pcs/cal-factory.c b/calendar/pcs/cal-factory.c index 1df133ea90..767e6ec93c 100644 --- a/calendar/pcs/cal-factory.c +++ b/calendar/pcs/cal-factory.c @@ -300,6 +300,22 @@ open_backend (CalFactory *factory, const char *uristr, gboolean only_if_exists, CORBA_exception_free (&ev); return NULL; + case CAL_BACKEND_OPEN_PERMISSION_DENIED : + gtk_object_unref (GTK_OBJECT (backend)); + + CORBA_exception_init (&ev); + GNOME_Evolution_Calendar_Listener_notifyCalOpened ( + listener, + GNOME_Evolution_Calendar_Listener_PERMISSION_DENIED, + CORBA_OBJECT_NIL, + &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("open_backend(): could not notify the listener"); + + CORBA_exception_free (&ev); + return NULL; + default: g_assert_not_reached (); return NULL; -- cgit v1.2.3