mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
- neutrino: add upgradeSetup function ...
... to upgrade neutrino.conf to new defaults if needed
This commit is contained in:
@@ -912,11 +912,32 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
|
||||
g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000");
|
||||
|
||||
if (g_settings.version_pseudo < NEUTRINO_VERSION_PSEUDO)
|
||||
upgradeSetup(fname);
|
||||
|
||||
if(erg)
|
||||
configfile.setModifiedFlag(true);
|
||||
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 *
|
||||
**************************************************************************************/
|
||||
|
@@ -162,6 +162,7 @@ public:
|
||||
|
||||
void saveSetup(const char * fname);
|
||||
int loadSetup(const char * fname);
|
||||
void upgradeSetup(const char * fname);
|
||||
void loadKeys(const char * fname = NULL);
|
||||
void saveKeys(const char * fname = NULL);
|
||||
void SetupTiming();
|
||||
|
@@ -1 +1 @@
|
||||
#define NEUTRINO_VERSION_PSEUDO "19700101000000"
|
||||
#define NEUTRINO_VERSION_PSEUDO "20160226110000"
|
||||
|
Reference in New Issue
Block a user