Fl_Preferences bug

* fix incorrect code for fltk 4.x preferences file
    . notify code was not using the correct file name
  * change all references 'w1hkj.com' to 'w1hkj.org'
This commit is contained in:
dave-w1hkj 2025-08-11 01:00:00 -05:00 committed by dave-w1hkj
parent 7ae0a15430
commit 59b2bbd9f0
4 changed files with 22 additions and 14 deletions

View file

@ -1042,8 +1042,8 @@ void save_cloud_prefs()
Fl_Preferences spref(HomeDir.c_str(), "w1hkj.org", "cloud_fields");
#else
Fl_Preferences spref(
std::string(HomeDir).c_str(),
"w1hkj.com",
HomeDir.c_str(),
"w1hkj.org",
"cloud_fields",
Fl_Preferences::C_LOCALE);
#endif
@ -1109,8 +1109,8 @@ void load_cloud_prefs()
Fl_Preferences spref(HomeDir.c_str(), "w1hkj.org", "cloud_fields");
#else
Fl_Preferences spref(
std::string(HomeDir).c_str(),
"w1hkj.com",
HomeDir.c_str(),
"w1hkj.org",
"cloud_fields",
Fl_Preferences::C_LOCALE);
#endif
@ -1448,8 +1448,8 @@ void save_udp_prefs()
Fl_Preferences spref(HomeDir.c_str(), "w1hkj.org", "udp_fields");
#else
Fl_Preferences spref(
std::string(HomeDir).c_str(),
"w1hkj.com",
HomeDir.c_str(),
"w1hkj.org",
"udp_fields",
Fl_Preferences::C_LOCALE);
#endif
@ -1515,8 +1515,8 @@ void load_udp_prefs()
Fl_Preferences spref(HomeDir.c_str(), "w1hkj.org", "udp_fields");
#else
Fl_Preferences spref(
std::string(HomeDir).c_str(),
"w1hkj.com",
HomeDir.c_str(),
"w1hkj.org",
"udp_fields",
Fl_Preferences::C_LOCALE);
#endif

View file

@ -1605,7 +1605,11 @@ static void notify_save(void)
#if FLDIGI_FLTK_API_MINOR < 4
Fl_Preferences ndata(HomeDir.c_str(), PACKAGE_TARNAME, "notify");
#else
Fl_Preferences ndata(std::string(HomeDir).append("fldigi.prefs").c_str(), PACKAGE_TARNAME, "notify", (Fl_Preferences::Root)0);
Fl_Preferences ndata(
HomeDir.c_str(),
PACKAGE_TARNAME,
"notify",
(Fl_Preferences::Root)0);
#endif
ndata.set("items", static_cast<int>(notify_list.size()));
@ -1658,7 +1662,11 @@ static void notify_load(void)
#if FLDIGI_FLTK_API_MINOR < 4
Fl_Preferences ndata(HomeDir.c_str(), PACKAGE_TARNAME, "notify");
#else
Fl_Preferences ndata(std::string(HomeDir).append("fldigi.prefs").c_str(), PACKAGE_TARNAME, "notify", (Fl_Preferences::Root)0);
Fl_Preferences ndata(
HomeDir.c_str(),
PACKAGE_TARNAME,
"notify",
(Fl_Preferences::Root)0);
#endif
if (!ndata.get("items", x, 0) || x <= 0)

View file

@ -124,7 +124,7 @@ void ModeBand::save_mode_state()
#else
Fl_Preferences spref(
HomeDir.c_str(),
"w1hkj.com",
"w1hkj.org",
"mode_state",
Fl_Preferences::C_LOCALE);
#endif
@ -160,7 +160,7 @@ void ModeBand::load_mode_state() {
#else
Fl_Preferences spref(
HomeDir.c_str(),
"w1hkj.com",
"w1hkj.org",
"mode_state",
Fl_Preferences::C_LOCALE);
#endif

View file

@ -501,7 +501,7 @@ void status::saveLastState()
#else
Fl_Preferences spref(
HomeDir.c_str(),
"w1hkj.com",
"w1hkj.org",
PACKAGE_TARNAME,
Fl_Preferences::C_LOCALE);
#endif
@ -789,7 +789,7 @@ void status::loadLastState()
#else
Fl_Preferences spref(
HomeDir.c_str(),
"w1hkj.com",
"w1hkj.org",
PACKAGE_TARNAME,
Fl_Preferences::C_LOCALE);
#endif