Index: calendar/gui/print.c
===================================================================
--- calendar/gui/print.c	(revision 37459)
+++ calendar/gui/print.c	(working copy)
@@ -2583,7 +2583,6 @@ print_comp_draw_real (GtkPrintOperation 
 			char *priority_string, *pri_text;
 
 			priority_string = e_cal_util_priority_to_string (*priority);
-			e_cal_component_free_priority (priority);
 
 			pri_text = g_strdup_printf (_("Priority: %s"), priority_string);
 			top = bound_text (context, font, pri_text, -1,
@@ -2592,6 +2591,9 @@ print_comp_draw_real (GtkPrintOperation 
 			g_free (pri_text);
 		}
 
+		if (priority)
+			e_cal_component_free_priority (priority);
+
 		/* Percent Complete */
 		e_cal_component_get_percent (comp, &percent);
 		if (percent) {
Index: calendar/gui/e-cal-component-preview.c
===================================================================
--- calendar/gui/e-cal-component-preview.c	(revision 37459)
+++ calendar/gui/e-cal-component-preview.c	(working copy)
@@ -272,9 +272,11 @@ write_html (GtkHTMLStream *stream, ECal 
 		gtk_html_stream_printf (stream, "<TD>%s</TD></TR>", str);
 
 		g_free (str);
-		e_cal_component_free_priority (priority_value);
 	}
 
+	if (priority_value)
+		e_cal_component_free_priority (priority_value);
+
 	/* write description and URL */
 	gtk_html_stream_printf (stream, "<TR><TD COLSPAN=\"2\"><HR></TD></TR>");
 
Index: calendar/gui/e-memo-table.etspec
===================================================================
--- calendar/gui/e-memo-table.etspec	(revision 37459)
+++ calendar/gui/e-memo-table.etspec	(working copy)
@@ -3,6 +3,8 @@
   <ETableColumn model_col="7" pixbuf="icon" _title="Type" expansion="1.0" minimum_width="16" resizable="false" cell="icon" compare="integer" priority="-4"/>
   <ETableColumn model_col="0" _title="Categories" cell="calstring" compare="collate" expansion="1.0" minimum_width="10" resizable="true" priority="-2"/>
   <ETableColumn model_col="5" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
+  <ETableColumn model_col="10" _title="Created" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
+  <ETableColumn model_col="11" _title="Last modified" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
 
   <ETableState>
     <column source="1"/>
Index: calendar/gui/e-calendar-table.etspec
===================================================================
--- calendar/gui/e-calendar-table.etspec	(revision 37459)
+++ calendar/gui/e-calendar-table.etspec	(working copy)
@@ -2,13 +2,15 @@
   <ETableColumn model_col= "5" _title="Start date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
   <ETableColumn model_col="7" pixbuf="icon" _title="Type" expansion="1.0" minimum_width="16" resizable="false" cell="icon" compare="integer" priority="-4"/>
   <ETableColumn model_col= "8" _title="Summary" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="stringcase" priority="10"/>
-  <ETableColumn model_col= "10" _title="Completion date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
-  <ETableColumn model_col="11" pixbuf="complete" _title="Complete" expansion="1.0" minimum_width="16" resizable="false" cell="checkbox" compare="integer" priority="-4"/>
-  <ETableColumn model_col= "12" _title="Due date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
-  <ETableColumn model_col= "15" _title="% Complete" expansion="1.0" minimum_width="10" resizable="true" cell="percent" compare="percent-compare" priority="-3"/>
-  <ETableColumn model_col= "16" _title="Priority" expansion="1.0" minimum_width="10" resizable="true" cell="priority" compare="priority-compare" priority="-3"/>
-  <ETableColumn model_col="17" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="calstatus" compare="status-compare" priority="-1"/>
+  <ETableColumn model_col= "12" _title="Completion date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
+  <ETableColumn model_col="13" pixbuf="complete" _title="Complete" expansion="1.0" minimum_width="16" resizable="false" cell="checkbox" compare="integer" priority="-4"/>
+  <ETableColumn model_col= "14" _title="Due date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
+  <ETableColumn model_col= "17" _title="% Complete" expansion="1.0" minimum_width="10" resizable="true" cell="percent" compare="percent-compare" priority="-3"/>
+  <ETableColumn model_col= "18" _title="Priority" expansion="1.0" minimum_width="10" resizable="true" cell="priority" compare="priority-compare" priority="-3"/>
+  <ETableColumn model_col="19" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="calstatus" compare="status-compare" priority="-1"/>
   <ETableColumn model_col="0" _title="Categories" cell="calstring" compare="stringcase" expansion="1.0" minimum_width="10" resizable="true" priority="-2"/>
+  <ETableColumn model_col="10" _title="Created" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
+  <ETableColumn model_col="11" _title="Last modified" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
 
   <ETableState>
     <column source="1"/>
Index: calendar/gui/e-cal-list-view.etspec
===================================================================
--- calendar/gui/e-cal-list-view.etspec	(revision 37459)
+++ calendar/gui/e-cal-list-view.etspec	(working copy)
@@ -1,9 +1,11 @@
 <ETableSpecification draw-grid="true" alternating-row-colors="true">
   <ETableColumn model_col="5" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
-  <ETableColumn model_col="10" _title="End Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
+  <ETableColumn model_col="12" _title="End Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
   <ETableColumn model_col="8" _title="Summary" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="collate" priority="10"/>
-  <ETableColumn model_col="11" _title="Location" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="collate" priority="10"/>
+  <ETableColumn model_col="13" _title="Location" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="collate" priority="10"/>
   <ETableColumn model_col="0" _title="Categories" cell="calstring" compare="collate" expansion="1.0" minimum_width="10" resizable="true" priority="-2"/>
+  <ETableColumn model_col="10" _title="Created" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
+  <ETableColumn model_col="11" _title="Last modified" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare" priority="-2"/>
 
   <ETableState>
     <column source="2"/>
Index: calendar/gui/e-cal-model.c
===================================================================
--- calendar/gui/e-cal-model.c	(revision 37459)
+++ calendar/gui/e-cal-model.c	(working copy)
@@ -435,6 +435,43 @@ get_dtstart (ECalModel *model, ECalModel
 	return comp_data->dtstart;
 }
 
+static ECellDateEditValue*
+get_datetime_from_utc (ECalModel *model, ECalModelComponent *comp_data, icalproperty_kind propkind, struct icaltimetype (*get_value)(const icalproperty* prop), ECellDateEditValue **buffer)
+{
+	ECalModelPrivate *priv;
+        struct icaltimetype tt_value;
+	icalproperty *prop;
+	ECellDateEditValue *res;
+
+	g_return_val_if_fail (buffer!= NULL, NULL);
+
+	if (*buffer)
+		return *buffer;
+
+	priv = model->priv;
+
+	prop = icalcomponent_get_first_property (comp_data->icalcomp, propkind);
+	if (!prop)
+		return NULL;
+
+	tt_value = get_value (prop);
+
+	/* these are always in UTC, thus convert to default zone, if any and done */
+	if (priv->zone)
+		icaltimezone_convert_time (&tt_value, icaltimezone_get_utc_timezone (), priv->zone);
+
+	if (!icaltime_is_valid_time (tt_value) || icaltime_is_null_time (tt_value))
+		return NULL;
+
+	res = g_new0 (ECellDateEditValue, 1);
+	res->tt = tt_value;
+	res->zone = NULL;
+
+	*buffer = res;
+
+	return res;
+}
+
 static char *
 get_summary (ECalModelComponent *comp_data)
 {
@@ -484,6 +521,10 @@ ecm_value_at (ETableModel *etm, int col,
 		return get_description (comp_data);
 	case E_CAL_MODEL_FIELD_DTSTART :
 		return (void *) get_dtstart (model, comp_data);
+	case E_CAL_MODEL_FIELD_CREATED :
+		return (void *) get_datetime_from_utc (model, comp_data, ICAL_CREATED_PROPERTY, icalproperty_get_created, &comp_data->created);
+	case E_CAL_MODEL_FIELD_LASTMODIFIED :
+		return (void *) get_datetime_from_utc (model, comp_data, ICAL_LASTMODIFIED_PROPERTY, icalproperty_get_lastmodified, &comp_data->lastmodified);
 	case E_CAL_MODEL_FIELD_HAS_ALARMS :
 		return GINT_TO_POINTER ((icalcomponent_get_first_component (comp_data->icalcomp,
 									    ICAL_VALARM_COMPONENT) != NULL));
@@ -878,6 +919,8 @@ ecm_duplicate_value (ETableModel *etm, i
 	case E_CAL_MODEL_FIELD_COMPONENT :
 		return icalcomponent_new_clone ((icalcomponent *) value);
 	case E_CAL_MODEL_FIELD_DTSTART :
+	case E_CAL_MODEL_FIELD_CREATED :
+	case E_CAL_MODEL_FIELD_LASTMODIFIED :
 		if (value) {
 			ECellDateEditValue *dv, *orig_dv;
 
@@ -911,6 +954,8 @@ ecm_free_value (ETableModel *etm, int co
 	case E_CAL_MODEL_FIELD_COLOR :
 		break;
 	case E_CAL_MODEL_FIELD_DTSTART :
+	case E_CAL_MODEL_FIELD_CREATED :
+	case E_CAL_MODEL_FIELD_LASTMODIFIED :
 		if (value)
 			g_free (value);
 		break;
@@ -940,6 +985,8 @@ ecm_initialize_value (ETableModel *etm, 
 	case E_CAL_MODEL_FIELD_SUMMARY :
 		return g_strdup ("");
 	case E_CAL_MODEL_FIELD_DTSTART :
+	case E_CAL_MODEL_FIELD_CREATED :
+	case E_CAL_MODEL_FIELD_LASTMODIFIED :
 	case E_CAL_MODEL_FIELD_HAS_ALARMS :
 	case E_CAL_MODEL_FIELD_ICON :
 	case E_CAL_MODEL_FIELD_COLOR :
@@ -978,6 +1025,8 @@ ecm_value_is_empty (ETableModel *etm, in
 	case E_CAL_MODEL_FIELD_SUMMARY :
 		return string_is_empty (value);
 	case E_CAL_MODEL_FIELD_DTSTART :
+	case E_CAL_MODEL_FIELD_CREATED :
+	case E_CAL_MODEL_FIELD_LASTMODIFIED :
 		return value ? FALSE : TRUE;
 	case E_CAL_MODEL_FIELD_HAS_ALARMS :
 	case E_CAL_MODEL_FIELD_ICON :
@@ -1001,6 +1050,8 @@ ecm_value_to_string (ETableModel *etm, i
 	case E_CAL_MODEL_FIELD_SUMMARY :
 		return g_strdup (value);
 	case E_CAL_MODEL_FIELD_DTSTART :
+	case E_CAL_MODEL_FIELD_CREATED :
+	case E_CAL_MODEL_FIELD_LASTMODIFIED :
 		return e_cal_model_date_value_to_string (E_CAL_MODEL (etm), value);
 	case E_CAL_MODEL_FIELD_ICON :
 		if (GPOINTER_TO_INT (value) == 0)
@@ -1567,6 +1618,14 @@ e_cal_view_objects_modified_cb (ECalView
 				g_free (comp_data->completed);
 				comp_data->completed = NULL;
 			}
+			if (comp_data->created) {
+				g_free (comp_data->created);
+				comp_data->created = NULL;
+			}
+			if (comp_data->lastmodified) {
+				g_free (comp_data->lastmodified);
+				comp_data->lastmodified = NULL;
+			}
 			if (comp_data->color) {
 				g_free (comp_data->color);
 				comp_data->color = NULL;
@@ -2307,6 +2366,14 @@ e_cal_model_component_finalize (GObject 
 		g_free (comp_data->completed);
 		comp_data->completed = NULL;
 	}
+	if (comp_data->created) {
+		g_free (comp_data->created);
+		comp_data->created = NULL;
+	}
+	if (comp_data->lastmodified) {
+		g_free (comp_data->lastmodified);
+		comp_data->lastmodified = NULL;
+	}
 	if (comp_data->color) {
 		g_free (comp_data->color);
 		comp_data->color = NULL;
@@ -2324,6 +2391,8 @@ e_cal_model_component_init (ECalModelCom
 	comp->dtend = NULL;
 	comp->due = NULL;
 	comp->completed = NULL;
+	comp->created = NULL;
+	comp->lastmodified = NULL;
 	comp->color = NULL;
 }
 
Index: calendar/gui/e-cal-model.h
===================================================================
--- calendar/gui/e-cal-model.h	(revision 37459)
+++ calendar/gui/e-cal-model.h	(working copy)
@@ -53,6 +53,8 @@ typedef enum {
 	E_CAL_MODEL_FIELD_ICON,             /* not a real field */
 	E_CAL_MODEL_FIELD_SUMMARY,
 	E_CAL_MODEL_FIELD_UID,
+	E_CAL_MODEL_FIELD_CREATED,
+	E_CAL_MODEL_FIELD_LASTMODIFIED,
 	E_CAL_MODEL_FIELD_LAST
 } ECalModelField;
 
@@ -86,6 +88,8 @@ struct _ECalModelComponent {
 	ECellDateEditValue *dtend;
 	ECellDateEditValue *due;
 	ECellDateEditValue *completed;
+	ECellDateEditValue *created;
+	ECellDateEditValue *lastmodified;
 	gchar *color;
 
 	ECalModelComponentPrivate *priv;
Index: calendar/ChangeLog
===================================================================
--- calendar/ChangeLog	(revision 37459)
+++ calendar/ChangeLog	(working copy)
@@ -1,3 +1,23 @@
+2009-03-18  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #575773
+
+	* gui/e-calendar-table.etspec:
+	* gui/e-cal-list-view.etspec:
+	* gui/e-memo-table.etspec:
+	* gui/e-cal-model.h: (ECalModelField), (struct _ECalModelComponent):
+	* gui/e-cal-model.c: (get_datetime_from_utc), (ecm_value_at),
+	(ecm_duplicate_value), (ecm_free_value), (ecm_initialize_value),
+	(ecm_value_is_empty), (ecm_value_to_string),
+	(e_cal_view_objects_modified_cb), (e_cal_model_component_finalize),
+	(e_cal_model_component_init):
+	Allow showing CREATED and LAST-MODIFIED properties in a table.
+
+	* gui/print.c: (print_comp_draw_real):
+	* gui/e-cal-component-preview.c: (write_html):
+	* conduits/todo/todo-conduit.c: (local_record_from_comp):
+	Possible leak fix.
+
 2009-03-06  Milan Crha  <mcrha@redhat.com>
 
 	** Fix for bug #401346
Index: calendar/conduits/todo/todo-conduit.c
===================================================================
--- calendar/conduits/todo/todo-conduit.c	(revision 37459)
+++ calendar/conduits/todo/todo-conduit.c	(working copy)
@@ -764,12 +764,13 @@ local_record_from_comp (EToDoLocalRecord
 			local->todo->priority = 4;
 		else
 			local->todo->priority = 5;
-
-		e_cal_component_free_priority (priority);
 	} else {
 		local->todo->priority = ctxt->cfg->priority;
 	}
 
+	if (priority)
+		e_cal_component_free_priority (priority);
+
 	e_cal_component_get_classification (comp, &classif);
 
 	if (classif == E_CAL_COMPONENT_CLASS_PRIVATE)
