neutrino: add upgradeSetup function ...

... to upgrade neutrino.conf to new defaults if needed


Origin commit data
------------------
Branch: ni/coolstream
Commit: 66258704bf
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-03-03 (Thu, 03 Mar 2016)

Origin message was:
------------------
- neutrino: add upgradeSetup function ...

... to upgrade neutrino.conf to new defaults if needed


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-03-03 09:04:08 +01:00
committed by Michael Liebmann
parent ed757e69fe
commit 0ceff9e442
3 changed files with 23 additions and 1 deletions

View File

@@ -912,11 +912,32 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000"); g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000");
if (g_settings.version_pseudo < NEUTRINO_VERSION_PSEUDO)
upgradeSetup(fname);
if(erg) if(erg)
configfile.setModifiedFlag(true); configfile.setModifiedFlag(true);
return erg; return erg;
} }
void CNeutrinoApp::upgradeSetup(const char * fname)
{
if (g_settings.version_pseudo < "20160226110000")
{
if (g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items == "7")
{
g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items = "7,31";
configfile.setString("usermenu_tv_yellow", g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items);
}
}
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
configfile.setString("version_pseudo", g_settings.version_pseudo);
if (configfile.getModifiedFlag())
configfile.saveConfig(fname);
}
/************************************************************************************** /**************************************************************************************
* CNeutrinoApp - saveSetup, save the application-settings * * CNeutrinoApp - saveSetup, save the application-settings *
**************************************************************************************/ **************************************************************************************/

View File

@@ -162,6 +162,7 @@ public:
void saveSetup(const char * fname); void saveSetup(const char * fname);
int loadSetup(const char * fname); int loadSetup(const char * fname);
void upgradeSetup(const char * fname);
void loadKeys(const char * fname = NULL); void loadKeys(const char * fname = NULL);
void saveKeys(const char * fname = NULL); void saveKeys(const char * fname = NULL);
void SetupTiming(); void SetupTiming();

View File

@@ -1 +1 @@
#define NEUTRINO_VERSION_PSEUDO "19700101000000" #define NEUTRINO_VERSION_PSEUDO "20160226110000"