diff options
author | Robert Helling <helling@lmu.de> | 2013-11-18 14:53:05 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-18 10:03:45 -0800 |
commit | 4966336e1d6c729e5763aa3ac607c77f8794e5da (patch) | |
tree | 0c7183ea8570f38c366e8145557937af8d416821 /dive.c | |
parent | e289881db9727b5bcfec12c3c390cdd6743f7472 (diff) | |
download | subsurface-4966336e1d6c729e5763aa3ac607c77f8794e5da.tar.gz |
Shift times of selected dives
This patch adds the possibility to shift the times of all selected dives
by a fixed amount to correct for time zone problems or mis-set dive
computer clocks.
Select the dives and right click in the dive list.
[Dirk Hohndel: added .ui file to FORMS and fixed some whitespace damage]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -2072,3 +2072,15 @@ struct dive *find_dive_n_near(timestamp_t when, int n, timestamp_t offset) } return NULL; } + +void shift_times(const timestamp_t amount) +{ + int i; + struct dive *dive; + + for_each_dive (i, dive) { + if (!dive->selected) + continue; + dive->when += amount; + } +} |