n7tae / mvoice

A prototype M17 voice application for ham radio
GNU General Public License v2.0
55 stars 13 forks source link

Aa4hs/better config #14

Closed maitbot closed 2 years ago

maitbot commented 2 years ago

The compile-time setting of CFG_DIR is crufty - since the ~ expansion is fragile. Refactoring to mvoice_cfg_dir and having main() as the one place to set it allows us to have main() process environment variables or command-line arguments to set it in the future. But, since it is now FTLK, maybe use Fl_Preferences. (FLTK < 1.4 uses ~/.fltk/... but newest FLTK will use ~/.config/... and honor $XDG_CONFIG_HOME)

Extra logic ignores the Fl_Preferences path if the mvoice48.png file is not found there. Falling back to compiled-in defaults.