summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-09-18 14:31:15 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-18 11:59:53 -0500
commit7d9c1e9ee4e4e251f3a3b5e5901818fb5aaa340e (patch)
treeb85194d3ee74bc21f6e0c116904dc0f4303abe6d /profile.c
parent93d6eb13977aaf1e17fbb1861a2df001b67b8303 (diff)
downloadsubsurface-7d9c1e9ee4e4e251f3a3b5e5901818fb5aaa340e.tar.gz
Show sample time in the mouseover.
This is really nice to have when looking at specific coutures of a dive or events. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 5c947fbfa..693b24697 100644
--- a/profile.c
+++ b/profile.c
@@ -1224,6 +1224,10 @@ static void plot_string(struct plot_data *entry, char *buf, int bufsize,
depthvalue = get_depth_units(depth, NULL, &depth_unit);
snprintf(buf, bufsize, _("D:%.1f %s"), depthvalue, depth_unit);
+ if (prefs.show_time) {
+ memcpy(buf2, buf, bufsize);
+ snprintf(buf, bufsize, _("%s\nT:%d:%02d"), buf2, FRACTION(entry->sec, 60));
+ }
if (pressure) {
pressurevalue = get_pressure_units(pressure, &pressure_unit);
memcpy(buf2, buf, bufsize);