Add default filename and divelist font to prefs structure

.. and add the usual logic to not save the default values.

This also simplifies the initial system-specific setup of both of these:
since we have defaults for all the preferences that get set up at
startup, we can just initialize those defaults to the system-specific
fonts then and there.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2013-01-11 17:07:22 -08:00 committed by Dirk Hohndel
parent 954290c70b
commit 6a10700ca5
11 changed files with 84 additions and 89 deletions

2
file.c
View file

@ -255,7 +255,7 @@ void parse_file(const char *filename, GError **error, gboolean possible_default_
if (readfile(filename, &mem) < 0) {
/* we don't want to display an error if this was the default file */
if (default_filename && ! strcmp(filename, default_filename))
if (prefs.default_filename && ! strcmp(filename, prefs.default_filename))
return;
g_warning(_("Failed to read '%s'.\n"), filename);