Added a new string in calendar-error.xml



Hi,
  Have added a new string in calendar-error.xml. Attaching the patch
which adds it.

thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2926
diff -u -p -u -p -r1.2926 ChangeLog
--- ChangeLog	10 Jan 2006 08:08:20 -0000	1.2926
+++ ChangeLog	12 Jan 2006 14:00:12 -0000
@@ -1,3 +1,12 @@
+2006-01-14  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-10  Simon Zheng  <simon zheng sun com>
 
 	* gui/calendar-component.c: (calendar_component_peek):
Index: calendar.error.xml
===================================================================
RCS file: /cvs/gnome/evolution/calendar/calendar.error.xml,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 calendar.error.xml
--- calendar.error.xml	6 Jan 2006 15:08:35 -0000	1.13
+++ calendar.error.xml	12 Jan 2006 14:00:12 -0000
@@ -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>
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.108
diff -u -p -u -p -r1.108 e-calendar-view.c
--- gui/e-calendar-view.c	2 Jan 2006 14:12:39 -0000	1.108
+++ gui/e-calendar-view.c	12 Jan 2006 14:00:13 -0000
@@ -1680,6 +1680,7 @@ e_calendar_view_new_appointment_for (ECa
 	ECalComponentTransparency transparency;
 	ECal *default_client = NULL;
 	guint32 flags = 0;
+	gboolean readonly = FALSE;
 
 	g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
 
@@ -1689,6 +1690,17 @@ e_calendar_view_new_appointment_for (ECa
 
 	if (default_client && e_cal_get_load_state (default_client) != E_CAL_LOAD_LOADED) {
 		g_warning ("Default client not loaded \n");
+		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;
 	}
 	


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