GUI settings that were changed during a session are not saved to config.ini if the program is stopped by pressing Ctrl-C in the virtual terminal from which it was started. They are saved if m-c is stopped by pressing Alt-F4, or by clicking the program's close window button.
Steps.
. Read the config.ini file, and store a copy of it in a temp file.
. Start m-c from a virtual terminal window.
. Start and stop Morse code generation.
. Change a setting, eg, volume and letterset.
. Start and stop Morse code again, verifying that the changes took effect.
. Close m-c by pressing Ctrl-C from the terminal window.
. Read the config.ini file again.
. See that the volume and letterset changes were not saved.
. Repeat the steps above, but close m-c by pressing Alt-F4 with focus in the m-c GUI.
. Read the config.ini file again.
. See that the volume and letterset changes were saved.
Suggest.
1. Provide a separate 'Quit' button in the m-c GUI, and save the config settings when it is clicked.
2. Document this behavior, so users are not surprised.
3. Consider catching the signal if m-c's parent dies (with Ctrl-C), and save config data when that happens.