Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.485
diff -u -r1.485 ChangeLog
--- calendar/ChangeLog	25 Jul 2005 04:58:29 -0000	1.485
+++ calendar/ChangeLog	26 Jul 2005 02:31:41 -0000
@@ -1,3 +1,10 @@
+2005-07-25  Nathan Owens <pianocomp81@yahoo.com>
+	
+	* libecal/e-cal.c: (e_cal_new_system_memos): added backend
+	support for Memos component. Finished implement VJOURNAL support
+	* libecal/e-cal.h: (e_cal_new_system_memos): added prototype
+	* tests/ecal/test-ecal.c: (test_new_system_memos): added memos test
+
 2005-07-23  Chenthill Palanisamy  <pchenthill@novell.com>
 
 	* backends/groupwise/e-cal-backend-groupwise-utils.c:
Index: calendar/libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.108
diff -u -r1.108 e-cal.c
--- calendar/libecal/e-cal.c	11 Jul 2005 02:19:28 -0000	1.108
+++ calendar/libecal/e-cal.c	26 Jul 2005 02:31:46 -0000
@@ -1527,6 +1527,19 @@
 	return ecal;
 }
 
+ECal *
+e_cal_new_system_memos (void)
+{
+	ECal *ecal;
+	char *uri;
+
+	uri = g_build_filename ("file://", g_get_home_dir (), ".evolution", "memos", "local", "system", NULL);
+	ecal = e_cal_new_from_uri (uri, E_CAL_SOURCE_TYPE_JOURNAL);
+	g_free (uri);
+	
+	return ecal;
+}
+
 /**
  * e_cal_set_auth_func
  * @ecal: A calendar client.
@@ -2830,7 +2843,8 @@
 		} else {
 			kind = icalcomponent_isa (tmp_icalcomp);
 			if ((kind == ICAL_VEVENT_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_EVENT) ||
-			    (kind == ICAL_VTODO_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_TODO)) {
+			    (kind == ICAL_VTODO_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_TODO) ||
+			    (kind == ICAL_VJOURNAL_COMPONENT && priv->type == E_CAL_SOURCE_TYPE_JOURNAL)) {
 				*icalcomp = icalcomponent_new_clone (tmp_icalcomp);
 			} else if (kind == ICAL_VCALENDAR_COMPONENT) {
 				icalcomponent *subcomp = NULL;
@@ -5254,6 +5268,9 @@
 	case E_CAL_SOURCE_TYPE_TODO:
 		return get_sources (sources, "/apps/evolution/tasks/sources", error);
 		break;
+	case E_CAL_SOURCE_TYPE_JOURNAL:
+		return get_sources (sources, "/apps/evolution/memos/sources", error);
+		break;
 	default:
 		/* FIXME Fill in error */
 		return FALSE;
Index: calendar/libecal/e-cal.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.h,v
retrieving revision 1.25
diff -u -r1.25 e-cal.h
--- calendar/libecal/e-cal.h	11 Jul 2005 00:51:07 -0000	1.25
+++ calendar/libecal/e-cal.h	26 Jul 2005 02:31:46 -0000
@@ -104,6 +104,7 @@
 ECal *e_cal_new_from_uri (const gchar *uri, ECalSourceType type);
 ECal *e_cal_new_system_calendar (void);
 ECal *e_cal_new_system_tasks (void);
+ECal *e_cal_new_system_memos (void);
 
 void e_cal_set_auth_func (ECal *ecal, ECalAuthFunc func, gpointer data);
 
Index: calendar/tests/ecal/test-ecal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/tests/ecal/test-ecal.c,v
retrieving revision 1.4
diff -u -r1.4 test-ecal.c
--- calendar/tests/ecal/test-ecal.c	2 Feb 2005 18:44:32 -0000	1.4
+++ calendar/tests/ecal/test-ecal.c	26 Jul 2005 02:31:48 -0000
@@ -475,6 +475,23 @@
 }
 
 static char *
+test_new_system_memos()
+{
+	ECal *cal;
+	char *uri;
+	gboolean created;
+	
+	cal = e_cal_new_system_memos ();
+	uri = g_build_filename (g_get_home_dir (), ".evolution", "memos", "local", "system", "journal.ics", NULL);
+	created = g_file_test (uri, G_FILE_TEST_EXISTS);
+	g_free (uri);
+	
+	mu_assert ("Test creation of default system memos : Failed", created);
+	
+	return NULL;
+}
+
+static char *
 test_get_free_busy (ECal *client)
 {
 	// TODO uses NULL for users and currently specific to file backend.
@@ -608,6 +625,7 @@
 		
 	mu_run_test (test_new_system_calendar ());
 	mu_run_test (test_new_system_tasks ());
+	mu_run_test (test_new_system_memos ());
 	mu_run_test (test_set_uri (client, uri));
 	mu_run_test (test_get_source (client, uri));
 	mu_run_test (test_cal_loaded (client));
