[evolution-patches] Calendar bug 56628



http://bugzilla.ximian.com/show_bug.cgi?id=56628

This is a patch for the above bug.

-Gary
? 56628.patch
? fb.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2245
diff -u -r1.2245 ChangeLog
--- ChangeLog	10 Apr 2004 21:31:37 -0000	1.2245
+++ ChangeLog	13 Apr 2004 03:22:21 -0000
@@ -1,3 +1,11 @@
+2004-04-12  Gary Ekker  <gekker novell com>
+
+        Fixes #56628
+	
+	* gui/calendar-component.c (create_new_event): Add informational dialog
+	when user attempts event creation in read-only calendar.
+	
+
 2004-04-09  Gary Ekker  <gekker novell com>
 
 	* gui/dialogs/url-editor-dialog.c: Fixed to use e-passwords.
Index: gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.157
diff -u -r1.157 calendar-component.c
--- gui/calendar-component.c	9 Apr 2004 15:56:21 -0000	1.157
+++ gui/calendar-component.c	13 Apr 2004 03:22:23 -0000
@@ -1055,9 +1055,17 @@
 		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,
+						 _("This calendar is read-only."));
+		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 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]