aboutsummaryrefslogtreecommitdiffstats
path: root/save-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-01 17:29:38 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-01 17:29:38 -0800
commita58d470bad755c138a84b5516fa27bf74924e24c (patch)
tree6b902760a42bba3707dff08191c5d3f442074d29 /save-xml.c
parent030d0c1294bf6c90c3a58e6678dc56760d197bcb (diff)
downloadsubsurface-a58d470bad755c138a84b5516fa27bf74924e24c.tar.gz
Remove autogroup from the preferences and store per file instead
Having two spots to toggle autogroup had always been a clear sign of insanity. The inconsistent ludicrous semantic of when we remembered the state of autogroup was even worse. This finally gets rid of that disaster and drops the autogroup setting from the preferences and makes it instead a per file property. When you save a file, it saves the state of the autogroup toggle. This seems much more useful - you may have files where you want to create trips by default. And others, where you don't. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r--save-xml.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c
index 0626d0adc..59eb02e23 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -532,6 +532,8 @@ void save_dives(const char *filename)
dc = dc->next;
}
}
+ if (autogroup)
+ fprintf(f, "<autogroup state='1' />\n");
fprintf(f, "</settings>\n<dives>\n");
for (trip = dive_trip_list; trip != NULL; trip = trip->next)