aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.c
diff options
context:
space:
mode:
authorGravatar Ďoďo <dodo.sk@gmail.com>2013-04-09 17:54:36 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 10:31:36 -0700
commited3f67bc33fbd9aac819687317d3066c22799f83 (patch)
tree0ca44c39b68f5e2681ebfd915e86105b8a4a0900 /prefs.c
parent68545465ba971952e4c66606e44786d9337f97ad (diff)
downloadsubsurface-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 'prefs.c')
-rw-r--r--prefs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/prefs.c b/prefs.c
index 7d41c0cf6..d1073c88f 100644
--- a/prefs.c
+++ b/prefs.c
@@ -113,6 +113,7 @@ void save_preferences(void)
SAVE_STRING("default_filename", default_filename);
SAVE_INT("map_provider", map_provider);
+ SAVE_INT("display_invalid_dives", display_invalid_dives);
/* Flush the changes out to the system */
subsurface_flush_conf();
@@ -204,6 +205,10 @@ void load_preferences(void)
prefs.default_filename = conf_value;
int_value = subsurface_get_conf_int("map_provider");
- if(int_value >= 0)
+ if (int_value >= 0)
prefs.map_provider = int_value;
+
+ int_value = subsurface_get_conf_int("display_invalid_dives");
+ if (int_value >= 0)
+ prefs.display_invalid_dives = int_value;
}