[PATCH] Show sample time in the mouseover.
Anton Lundin
glance at acc.umu.se
Mon Sep 16 23:26:05 UTC 2013
This is really nice to have when looking at specific coutures of a dive
or events. This needs hooking up in the preferences dialog.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
pref.h | 1 +
profile.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/pref.h b/pref.h
index f722dd1..8098c27 100644
--- a/pref.h
+++ b/pref.h
@@ -47,6 +47,7 @@ struct preferences {
short show_invalid;
short unit_system;
struct units units;
+ short show_time;
};
enum unit_system_values { METRIC, IMPERIAL, PERSONALIZE };
diff --git a/profile.c b/profile.c
index e0e9bad..b2d0d8a 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, entry->sec/60, entry->sec%60);
+ }
if (pressure) {
pressurevalue = get_pressure_units(pressure, &pressure_unit);
memcpy(buf2, buf, bufsize);
--
1.8.1.2
More information about the subsurface
mailing list