update: fix release cycle handling; add human readable version string

Origin commit data
------------------
Commit: 87d60639ae
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-11-29 (Thu, 29 Nov 2018)

Origin message was:
------------------
- update: fix release cycle handling; add human readable version string
This commit is contained in:
vanhofen
2018-11-29 22:47:42 +01:00
parent d946dcd2cb
commit 311f1857fa
7 changed files with 33 additions and 34 deletions

View File

@@ -238,13 +238,7 @@ bool CFlashUpdate::selectHttpImage(void)
showStatusMessageUTF(g_Locale->getText(LOCALE_FLASHUPDATE_GETINFOFILE));
char current[200];
#if 0
snprintf(current, 200, "%s: %s %s %s %s %s", g_Locale->getText(LOCALE_FLASHUPDATE_CURRENTVERSION_SEP), curInfo.getReleaseCycle(),
g_Locale->getText(LOCALE_FLASHUPDATE_CURRENTVERSIONDATE), curInfo.getDate(),
g_Locale->getText(LOCALE_FLASHUPDATE_CURRENTVERSIONTIME), curInfo.getTime());
#endif
//NI
snprintf(current, 200, "%s %s %s %s", curInfo.getReleaseCycle(), curInfo.getType(true), curInfo.getDate(), curInfo.getTime());
snprintf(current, 200, "%s %s - %s, %s", curInfo.getType(true), curInfo.getVersionString(), curInfo.getDate(), curInfo.getTime());
CMenuWidget SelectionWidget(LOCALE_FLASHUPDATE_SELECTIMAGE, NEUTRINO_ICON_UPDATE, listWidth, MN_WIDGET_ID_IMAGESELECTOR);
@@ -303,12 +297,12 @@ bool CFlashUpdate::selectHttpImage(void)
if(!allow_flash && (versionInfo.snapshot <= '2'))
enabled = false;
fileTypes[i] = versionInfo.snapshot;
std::string description = versionInfo.getReleaseCycle();
description += ' ';
description += versionInfo.getType(true);
description += ' ';
std::string description = versionInfo.getType(true);
description += " ";
description += versionInfo.getVersionString();
description += " - ";
description += versionInfo.getDate();
description += ' ';
description += ", ";
description += versionInfo.getTime();
descriptions.push_back(description); /* workaround since CMenuForwarder does not store the Option String itself */
@@ -417,7 +411,7 @@ bool CFlashUpdate::checkVersion4Update()
msg_body = LOCALE_FLASHUPDATE_MSGBOX;
#ifdef SQUASHFS
versionInfo = new CFlashVersionInfo(newVersion);//Memory leak: versionInfo
sprintf(msg, g_Locale->getText(msg_body), versionInfo->getDate(), versionInfo->getTime(), versionInfo->getReleaseCycle(), versionInfo->getType(true));
sprintf(msg, g_Locale->getText(msg_body), versionInfo->getType(true), versionInfo->getVersionString(), versionInfo->getDate(), versionInfo->getTime());
if (fileType <= '2')
{