aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2006-01-13 15:34:20 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2006-01-13 15:34:20 +0800
commit8496b2eafbed44f3730c5b8ccb98050fdd3e8206 (patch)
treeb51b4c41dbbd0c4e677cc9a6cd17611d511d9053
parenta3af03a8c5c84a67712c27ec03574b49ee5d1b3b (diff)
downloadgsoc2013-evolution-8496b2eafbed44f3730c5b8ccb98050fdd3e8206.tar
gsoc2013-evolution-8496b2eafbed44f3730c5b8ccb98050fdd3e8206.tar.gz
gsoc2013-evolution-8496b2eafbed44f3730c5b8ccb98050fdd3e8206.tar.bz2
gsoc2013-evolution-8496b2eafbed44f3730c5b8ccb98050fdd3e8206.tar.lz
gsoc2013-evolution-8496b2eafbed44f3730c5b8ccb98050fdd3e8206.tar.xz
gsoc2013-evolution-8496b2eafbed44f3730c5b8ccb98050fdd3e8206.tar.zst
gsoc2013-evolution-8496b2eafbed44f3730c5b8ccb98050fdd3e8206.zip
fixes #271541
svn path=/trunk/; revision=31155
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/calendar.error.xml6
-rw-r--r--calendar/gui/e-calendar-view.c12
3 files changed, 27 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 4df89fb7e2..b18d89024a 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,14 @@
2006-01-13 Chenthill Palanisamy <pchenthill@novell.com>
+ Fixes #271541
+ * calendar.error.xml: Added a new message for displaying
+ error message while trying to create a new event in read only
+ calendars
+ * gui/e-calendar-view.c: (e_calendar_view_new_appointment_for):
+ Run the error dialog using the message.
+
+2006-01-13 Chenthill Palanisamy <pchenthill@novell.com>
+
Fixes #326735
* gui/dialogs/event-page.c: (event_page_fill_widgets): If
the user is not the organizer, set the orignal organizer in
diff --git a/calendar/calendar.error.xml b/calendar/calendar.error.xml
index d262bb8495..c988dc371b 100644
--- a/calendar/calendar.error.xml
+++ b/calendar/calendar.error.xml
@@ -222,6 +222,12 @@
<button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
</error>
+ <error id="prompt-read-only-cal" type="error" default="GTK_RESPONSE_YES">
+ <_primary>Cannot create a new event</_primary>
+ <_secondary>The calendar you have selected is read-only</_secondary>
+ <button stock ="gtk-ok" response="GTK_RESPONSE_YES"/>
+ </error>
+
<error id="prompt-no-contents-offline-tasks" type="error" default="GTK_RESPONSE_YES">
<_primary>Error loading task list</_primary>
<_secondary>The task list is not marked for offline usage.</_secondary>
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;