summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-14 16:07:25 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-14 17:16:00 -0700
commite8ec3df371f0496a52ebdc463245d7b9df3be6ff (patch)
treeea3616f4779aed38c860fe0328ef41a6e4e06df1 /dive.c
parent3c542b5a418751f22511f6b1d554252c6e472a43 (diff)
downloadsubsurface-e8ec3df371f0496a52ebdc463245d7b9df3be6ff.tar.gz
Add exposure protection tracking
For simplicity and shortness, throughout subsurface exposure protection is simply referred to as "suit". Add the fields to the data structures, add the column to the dive_list and the preferences dialog (once again with it being turned invisible by default). Support loading and saving of the suit information. Display the suit information in the Dive Info pane (this may be a bit controversial as people could argue this should be in the Equipment pane) and allow editing of the suit info, with our usual support for completion and drop down lists to pick from. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index a420a3ef6..f5d082801 100644
--- a/dive.c
+++ b/dive.c
@@ -486,6 +486,7 @@ struct dive *fixup_dive(struct dive *dive)
add_people(dive->buddy);
add_people(dive->divemaster);
add_location(dive->location);
+ add_suit(dive->suit);
for (i = 0; i < MAX_CYLINDERS; i++) {
cylinder_t *cyl = dive->cylinder + i;
add_cylinder_description(&cyl->type);
@@ -703,6 +704,7 @@ struct dive *try_to_merge(struct dive *a, struct dive *b)
MERGE_TXT(res, a, b, buddy);
MERGE_TXT(res, a, b, divemaster);
MERGE_MAX(res, a, b, rating);
+ MERGE_TXT(res, a, b, suit);
MERGE_MAX(res, a, b, number);
MERGE_MAX(res, a, b, maxdepth.mm);
res->meandepth.mm = 0;