diff options
author | Ďoďo <dodo.sk@gmail.com> | 2013-04-09 17:54:36 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-09 10:31:36 -0700 |
commit | ed3f67bc33fbd9aac819687317d3066c22799f83 (patch) | |
tree | 0ca44c39b68f5e2681ebfd915e86105b8a4a0900 /save-xml.c | |
parent | 68545465ba971952e4c66606e44786d9337f97ad (diff) | |
download | subsurface-ed3f67bc33fbd9aac819687317d3066c22799f83.tar.gz |
Add dive tags and support invalid dives
This started out as a way to keep dives in the dive list but being able to
mark them as 'invalid' so they wouldn't be visible (with an option to
disable that feature).
Now it supports an (at this point, fixed) set of tags that can be assigned
to a dive with 'invalid' being just one of them (but one that is special
as it gets some additional support for hiding such dive and marking dives
as (in)valid from the divelist).
[Dirk Hohndel: merged with the latest code and minor changes for coding
style and consistency. Ensure divelist is marked as
modified when changing 'invalid' tag]
Signed-Off-By: Jozef Ivanecký (dodo.sk@gmail.com)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c index 7ae71dd57..d7ac878c5 100644 --- a/save-xml.c +++ b/save-xml.c @@ -451,6 +451,8 @@ void save_dive(FILE *f, struct dive *dive) fprintf(f, " rating='%d'", dive->rating); if (dive->visibility) fprintf(f, " visibility='%d'", dive->visibility); + if (dive->dive_tags) + fprintf(f, " tags='%d'", dive->dive_tags); show_date(f, dive->when); fprintf(f, " duration='%u:%02u min'>\n", FRACTION(dive->dc.duration.seconds, 60)); |