[evolution-patches] patch for #41740 (calendar)



I would have used e_error, but this would mean adding new strings, so
sticking with what we use in other parts of the calendar.

For HEAD, I can change it to use e_error, ok?
-- 
Rodrigo Moya <rodrigo novell com>
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2698
diff -u -p -r1.2698 ChangeLog
--- ChangeLog	22 Mar 2005 15:09:10 -0000	1.2698
+++ ChangeLog	23 Mar 2005 12:11:58 -0000
@@ -1,3 +1,10 @@
+2005-03-23  Rodrigo Moya <rodrigo novell com>
+
+	Fixes #41740
+
+	* gui/alarm-queue.c (edit_component): display error messages when we
+	can't load the component in the editor.
+
 2005-03-22  Chenthill Palanisamy  <pchenthill novell com>
 
 	* gui/calendar-component.c: (popup_event_cb): Popup all the 
Index: gui/alarm-notify/alarm-queue.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-queue.c,v
retrieving revision 1.82
diff -u -p -r1.82 alarm-queue.c
--- gui/alarm-notify/alarm-queue.c	15 Mar 2005 02:53:26 -0000	1.82
+++ gui/alarm-notify/alarm-queue.c	23 Mar 2005 12:11:59 -0000
@@ -667,6 +667,7 @@ edit_component (ECal *client, ECalCompon
 {
 	const char *uid;
 	const char *uri;
+	char *errmsg, *corba_msg;
 	ECalSourceType source_type;
 	CORBA_Environment ev;
 	GNOME_Evolution_Calendar_CompEditorFactory factory;
@@ -683,8 +684,12 @@ edit_component (ECal *client, ECalCompon
 						      0, NULL, &ev);
 
 	if (BONOBO_EX (&ev)) {
-		g_message (G_STRLOC ": Could not activate the component editor factory");
+		corba_msg = bonobo_exception_get_text (&ev);
+		errmsg = g_strdup_printf (_("Error on %s:\n %s"), uri, corba_msg);
+		gnome_error_dialog (errmsg);
 		CORBA_exception_free (&ev);
+		g_free (errmsg);
+		g_free (corba_msg);
 		return;
 	}
 
@@ -699,8 +704,13 @@ edit_component (ECal *client, ECalCompon
 	
 	GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, uri, (char *) uid, corba_type, &ev);
 
-	if (BONOBO_EX (&ev))
-		g_message (G_STRLOC ": Exception while editing the component");
+	if (BONOBO_EX (&ev)) {
+		corba_msg = bonobo_exception_get_text (&ev);
+		errmsg = g_strdup_printf (_("Error on %s:\n %s"), uri, corba_msg);
+		gnome_error_dialog (errmsg);
+		g_free (errmsg);
+		g_free (corba_msg);
+	}
 
 	CORBA_exception_free (&ev);
 


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