>From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001
From: Rick Walsh <[email protected]>
Date: Sun, 25 May 2014 14:57:36 +1200
Subject: [PATCH] Add location and max depth to world map export

Adds location name and maximum depth to the exported world map html file.
Minor formatting changes to exported text for consistency and clarity.

Signed-off-by: Rick Walsh <[email protected]>
From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001
From: Rick Walsh <[email protected]>
Date: Sun, 25 May 2014 14:57:36 +1200
Subject: [PATCH] Add location and max depth to world map export

Adds location name and maximum depth to the exported world map html file.
Minor formatting changes to exported text for consistency and clarity.

Signed-off-by: Rick Walsh <[email protected]>
---
 worldmap-save.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/worldmap-save.c b/worldmap-save.c
index 21a0810..e7448fd 100644
--- a/worldmap-save.c
+++ b/worldmap-save.c
@@ -17,14 +17,14 @@ void put_HTML_date(struct membuffer *b, struct dive *dive)
 {
 	struct tm tm;
 	utc_mkdate(dive->when, &tm);
-	put_format(b, "<p>date=%04u-%02u-%02u</p>", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
-	put_format(b, "<p>time=%02u:%02u:%02u</p>", tm.tm_hour, tm.tm_min, tm.tm_sec);
+	put_format(b, "<p>Date: %04u-%02u-%02u</p>", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
+	put_format(b, "<p>Time: %02u:%02u:%02u</p>", tm.tm_hour, tm.tm_min, tm.tm_sec);
 }
 
 void put_HTML_temp(struct membuffer *b, struct dive *dive)
 {
-	put_temperature(b, dive->airtemp, "<p>Air Temp: ", " C\\'</p>");
-	put_temperature(b, dive->watertemp, "<p>Water Temp: ", " C\\'</p>");
+	put_temperature(b, dive->airtemp, "<p>Air Temp: ", "°C</p>");
+	put_temperature(b, dive->watertemp, "<p>Water Temp: ", "°C</p>");
 }
 
 char *replace_char(char *str, char replace, char *replace_by)
@@ -78,7 +78,7 @@ void put_HTML_notes(struct membuffer *b, struct dive *dive)
 {
 	if (dive->notes) {
 		char *notes = quote(dive->notes);
-		put_format(b, "<p>Notes : %s </p>", notes);
+		put_format(b, "<p>Notes: %s </p>", notes);
 		free(notes);
 	}
 }
@@ -99,8 +99,10 @@ void writeMarkers(struct membuffer *b, const bool selected_only)
 		put_degrees(b, dive->latitude, "temp = new google.maps.Marker({position: new google.maps.LatLng(", "");
 		put_degrees(b, dive->longitude, ",", ")});\n");
 		put_string(b, "markers.push(temp);\ntempinfowindow = new google.maps.InfoWindow({content: '<div id=\"content\">'+'<div id=\"siteNotice\">'+'</div>'+'<div id=\"bodyContent\">");
+		put_format(b, "<p><b>%s</b></p>", dive->location);
 		put_HTML_date(b, dive);
-		put_duration(b, dive->duration, "<p>duration=", " min</p>");
+		put_duration(b, dive->duration, "<p>Duration: ", " min</p>");
+		put_depth(b, dive->maxdepth, "<p>Max Depth: ", " m</p>");
 		put_HTML_temp(b, dive);
 		put_HTML_notes(b, dive);
 		put_string(b, "</p>'+'</div>'+'</div>'});\ninfowindows.push(tempinfowindow);\n");
-- 
1.9.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to