diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-05-17 02:04:00 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-05-17 02:04:00 +0800 |
commit | 3a868a57bb55512cf7315b3178d9557d6350be32 (patch) | |
tree | cfa6e6d85e1c77944ddd7e193d5a00682e587a03 /calendar/gui | |
parent | 48140af35f90d7ec4f994821a5265b1fe0159cfa (diff) | |
download | gsoc2013-evolution-3a868a57bb55512cf7315b3178d9557d6350be32.tar gsoc2013-evolution-3a868a57bb55512cf7315b3178d9557d6350be32.tar.gz gsoc2013-evolution-3a868a57bb55512cf7315b3178d9557d6350be32.tar.bz2 gsoc2013-evolution-3a868a57bb55512cf7315b3178d9557d6350be32.tar.lz gsoc2013-evolution-3a868a57bb55512cf7315b3178d9557d6350be32.tar.xz gsoc2013-evolution-3a868a57bb55512cf7315b3178d9557d6350be32.tar.zst gsoc2013-evolution-3a868a57bb55512cf7315b3178d9557d6350be32.zip |
added support for CAL_CLIENT_OPEN_PERMISSION_DENIED error code.
2002-05-16 Rodrigo Moya <rodrigo@ximian.com>
* 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
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-tasks.c | 15 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 23bd46f34f..db00d2f8f3 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -406,6 +406,17 @@ method_error (ETasks *tasks, g_free (msg); } +/* Displays an error to indicate permission problems */ +static void +permission_error (ETasks *tasks, const char *uri) +{ + char *msg; + + msg = g_strdup_printf (_("You don't have permission to open the folder in `%s'"), uri); + gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks)))); + g_free (msg); +} + /* Callback from the calendar client when a calendar is opened */ static void cal_opened_cb (CalClient *client, @@ -446,6 +457,10 @@ cal_opened_cb (CalClient *client, method_error (tasks, cal_client_get_uri (client)); break; + case CAL_CLIENT_OPEN_PERMISSION_DENIED: + permission_error (tasks, cal_client_get_uri (client)); + break; + default: g_assert_not_reached (); } diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index ad6b485a6c..0b83d18392 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1551,6 +1551,17 @@ method_error (GnomeCalendar *gcal, const char *uri) g_free (msg); } +/* Displays an error to indicate permission problems */ +static void +permission_error (GnomeCalendar *gcal, const char *uri) +{ + char *msg; + + msg = g_strdup_printf (_("You don't have permission to open the folder in `%s'"), uri); + gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal)))); + g_free (msg); +} + /* Callback from the calendar client when a calendar is loaded */ static void client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data) @@ -1589,6 +1600,10 @@ client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer da method_error (gcal, cal_client_get_uri (client)); break; + case CAL_CLIENT_OPEN_PERMISSION_DENIED : + permission_error (gcal, cal_client_get_uri (client)); + break; + default: g_assert_not_reached (); return; |