From 1e0c8d98513ae0a937c6bbca4090e66e7e9bcbd1 Mon Sep 17 00:00:00 2001 From: Gary Ekker Date: Tue, 13 Apr 2004 13:55:32 +0000 Subject: Fixes #56628 2004-04-12 Gary Ekker Fixes #56628 * gui/calendar-component.c (create_new_event): Add informational dialog when user attempts event creation in read-only calendar. svn path=/trunk/; revision=25432 --- calendar/gui/calendar-component.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'calendar/gui/calendar-component.c') diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index ccc5f888e9..f4f5149eb4 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -1055,9 +1055,17 @@ create_new_event (CalendarComponent *calendar_component, gboolean is_allday, gbo bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed); return; } - if (!e_cal_is_read_only (priv->create_ecal, &read_only, NULL) || read_only) + if (!e_cal_is_read_only (priv->create_ecal, &read_only, NULL) || read_only) { + GtkWidget *dialog; + + dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, + GTK_MESSAGE_INFO, GTK_BUTTONS_OK, + _("Selected calendar is read-only, events cannot be created. Please select a read-write calendar.")); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); return; - + } + if (priv->calendar && (view = E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (priv->calendar)))) e_calendar_view_new_appointment_full (view, is_allday, is_meeting); else { -- cgit v1.2.3