Re: [Planner Dev] bug report: notes in resources are not saved





Issac, as attached is a patch that fixes this; the code
to read the resource notes from the XML files is just missing
yet ALL the other notes code is in place.

Weird. Wonder when this disappeared or has resource notes
*NEVER* worked on a  re-read of a Planner file ?!

I'll buzilla and forward the fix to Richard for review.

Lincoln.


Isaac Jones wrote:

Sorry to break threading.  I'm not subscribed to the list.  Can I
pleased be CC'd from now on?


Its true - they ARE saved BUT they then don't get read
into Planner when you re-read the file.


So the next time around, they won't get written?  I lost some notes this
way.  I think it's there in the stable branch as well.

peace,

isaac
Index: libplanner/mrp-old-xml.c
===================================================================
RCS file: /cvs/gnome/planner/libplanner/mrp-old-xml.c,v
retrieving revision 1.2
diff -u -b -B -p -r1.2 mrp-old-xml.c
--- libplanner/mrp-old-xml.c	15 Mar 2004 21:02:22 -0000	1.2
+++ libplanner/mrp-old-xml.c	25 Mar 2004 22:41:31 -0000
@@ -346,7 +350,7 @@ old_xml_read_resource (MrpParser *parser
 	xmlNodePtr   child;
 	gint         id;
 	gint         type;
-	gchar       *name, *short_name, *email;
+	gchar       *name, *short_name, *email, *note;
 	gint         gid;
 	gint         units;
 	gfloat       std_rate; /*, ovt_rate;*/
@@ -370,6 +374,7 @@ old_xml_read_resource (MrpParser *parser
 	/*ovt_rate = old_xml_get_float (tree, "ovt-rate");*/
 	email       = old_xml_get_string (tree, "email");
 	calendar_id = old_xml_get_int (tree, "calendar");
+	note        = old_xml_get_string (tree, "note");
 
 	if (short_name == NULL) {
 		short_name = g_strdup ("");
@@ -390,6 +395,7 @@ old_xml_read_resource (MrpParser *parser
 				 "units", units,
 				 "email", email,
 				 "calendar", calendar,
+				 "note", note,
 				 NULL);
 
 	/* These are cost custom properties */
@@ -415,6 +421,7 @@ old_xml_read_resource (MrpParser *parser
 	g_free (name);
 	g_free (email);
 	g_free (short_name);
+	g_free (note);
 }
 
 static void


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