diff options
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r-- | calendar/gui/e-calendar-view.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 0f854b619b..9ebfa248d5 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1680,6 +1680,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, ECalComponentTransparency transparency; ECal *default_client = NULL; guint32 flags = 0; + gboolean readonly = FALSE; g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); @@ -1692,6 +1693,17 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, return; } + if (e_cal_is_read_only (default_client, &readonly, NULL) && readonly) { + GtkWidget *widget; + + widget = e_error_new (NULL, "calendar:prompt-read-only-cal", NULL); + + g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy), + widget); + gtk_widget_show (widget); + return; + } + dt.value = &itt; if (all_day) dt.tzid = NULL; |