GTK: add a command-line --delete-prefs option.

If you want to remove your saved preferences for a puzzle for any
reason (perhaps because of one of those unsympathetic managers, or
perhaps because it's become corrupted in some way), you can of course
manually go and find the config file and delete it. But if you're not
sure where it is, it's helpful to have a method of telling the puzzle
itself to delete the config file.

Perhaps it would be useful to expose this in the GUI as well, though
I'm not quite sure where is the best place to put it.

(_Perhaps_ it would also be useful to have a more thorough option that
deleted _all_ puzzles' configurations - although that would involve
telling every separate puzzle binary in this collection what all the
other ones' names are, which would be an entirely new build headache.)
This commit is contained in:
Simon Tatham
2023-04-23 11:00:58 +01:00
parent 6c66e2b2de
commit e2add4185c
2 changed files with 83 additions and 0 deletions

View File

@ -364,6 +364,11 @@ in which case its behaviour is slightly different; see below.
}
\dt \cw{--delete-prefs}
\dd This option causes the puzzle to delete the configuration file in
which its user preferences were stored, if there is one.
\dt \I{printing, on Unix}\cw{--print }\e{w}\cw{x}\e{h}
\dd If this option is specified, instead of a puzzle being displayed,