From 1ed6a667bc7485481fbab293a431b6e5123bfad4 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 22 Sep 2024 17:39:52 +0200 Subject: [PATCH] weather-setup: change g_settings.weather_api_version to 3.0 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c902f2aac86f024aba5fe85c8d5977411d30aad3 Author: vanhofen Date: 2024-09-22 (Sun, 22 Sep 2024) Origin message was: ------------------ - weather-setup: change g_settings.weather_api_version to 3.0 ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/weather_setup.cpp | 4 ++-- src/neutrino.cpp | 6 +++++- version_pseudo.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gui/weather_setup.cpp b/src/gui/weather_setup.cpp index f92401dcc..4ad8b8a41 100644 --- a/src/gui/weather_setup.cpp +++ b/src/gui/weather_setup.cpp @@ -39,8 +39,8 @@ CMenuOptionChooser::keyval_ext WEATHER_API_OPTIONS[] = { - { 0, NONEXISTANT_LOCALE, "2.5" }, - { 1, NONEXISTANT_LOCALE, "3.0" } + { 0, NONEXISTANT_LOCALE, "3.0" }, + { 1, NONEXISTANT_LOCALE, "?.?" } // prepared for next API version }; #define WEATHER_API_OPTION_COUNT (sizeof(WEATHER_API_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext)) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6c6e9bcfa..2fb028341 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1116,7 +1116,7 @@ int CNeutrinoApp::loadSetup(const char *fname) g_settings.weather_api_version = WEATHER_API_VERSION; #if ENABLE_WEATHER_KEY_MANAGE g_settings.weather_api_key = configfile.getString("weather_api_key", g_settings.weather_api_key.empty() ? "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" : g_settings.weather_api_key); - g_settings.weather_api_version = configfile.getString("weather_api_version", g_settings.weather_api_version.empty() ? "2.5" : g_settings.weather_api_version); + g_settings.weather_api_version = configfile.getString("weather_api_version", g_settings.weather_api_version.empty() ? "3.0" : g_settings.weather_api_version); #endif g_settings.weather_enabled = configfile.getInt32("weather_enabled", 1); g_settings.weather_enabled = g_settings.weather_enabled && CApiKey::check_weather_api_key(); @@ -1501,6 +1501,10 @@ void CNeutrinoApp::upgradeSetup(const char * fname) g_settings.youtube_api_key = configfile.getString("youtube_dev_id", g_settings.youtube_api_key); configfile.deleteKey("youtube_dev_id"); } + if (g_settings.version_pseudo < "20240922210000") + { + g_settings.weather_api_version = "3.0"; + } g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO; configfile.setString("version_pseudo", g_settings.version_pseudo); diff --git a/version_pseudo.h b/version_pseudo.h index 3307cc143..2075a2ac7 100644 --- a/version_pseudo.h +++ b/version_pseudo.h @@ -1 +1 @@ -#define NEUTRINO_VERSION_PSEUDO "20240405210000" +#define NEUTRINO_VERSION_PSEUDO "20240922210000"