diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 23888b6f1..cdc10eaa2 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -712,7 +712,7 @@ flashupdate.menu_apply_settings Settingsübernahme erlauben flashupdate.mkfs_create_image Backup erstellen flashupdate.mkfs_preparing_files Dateien und Verzeichnisse vorbereiten flashupdate.mkfs_using_sumtool Benutze Sumtool -flashupdate.msgbox Es wurde folgende neue Datei gefunden:\nDatum: %s, %s\nBasisImage: %s\nTyp: %s\n\nWollen Sie diese Version jetzt herunterladen und installieren? +flashupdate.msgbox Es wurde folgendes Update gefunden:\n%s %s vom %s, %s\n\nWollen Sie diese Version jetzt herunterladen? flashupdate.mtdselector Partitions-Auswahl flashupdate.namemode1 Dateiname Settingsfile flashupdate.namemode1_default +settings.img diff --git a/data/locale/english.locale b/data/locale/english.locale index 3483b63df..5e84f66cb 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -712,7 +712,7 @@ flashupdate.menu_apply_settings Allow apply settings flashupdate.mkfs_create_image Create backup flashupdate.mkfs_preparing_files Preparing files and directories flashupdate.mkfs_using_sumtool Using sumtool -flashupdate.msgbox Found the following new file:\nDate: %s, %s\nBaseImage: %s\nType: %s\n\nDo you want to download and install this version now? +flashupdate.msgbox Found the following update:\n%s %s of %s, %s\n\nDo you want to download this version now? flashupdate.mtdselector Partition-Selector flashupdate.namemode1 Filename settingsfile flashupdate.namemode1_default +settings.img diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index e1379cfc0..95acd1580 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -331,7 +331,7 @@ void CImageInfo::InitInfoData() if (is_version_code && version_string.size() == 16){ static CFlashVersionInfo versionInfo(version_string.c_str()); if (oe_image_version.empty()){ - version_string = versionInfo.getReleaseCycle(); + version_string = versionInfo.getVersionString(); version_string += " "; version_string += versionInfo.getType(); version_string += " ("; diff --git a/src/gui/update.cpp b/src/gui/update.cpp index df4071394..e6a1672de 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -251,7 +251,7 @@ bool CFlashUpdate::selectHttpImage(void) char currentleft[200]; char currentright[200]; - snprintf(currentleft, 200, "%s %d - %s, %s", curInfo.getType(true), curInfo.getVersion(), curInfo.getDate(), curInfo.getTime()); + snprintf(currentleft, 200, "%s %s - %s, %s", curInfo.getType(true), curInfo.getVersionString(), curInfo.getDate(), curInfo.getTime()); snprintf(currentright, 200, "%s %s", imagedescription.c_str(), imageversion.c_str()); CMenuWidget SelectionWidget(LOCALE_FLASHUPDATE_SELECTIMAGE, NEUTRINO_ICON_UPDATE, listWidth, MN_WIDGET_ID_IMAGESELECTOR); @@ -313,7 +313,7 @@ bool CFlashUpdate::selectHttpImage(void) fileTypes[i] = versionInfo.snapshot; std::string description = versionInfo.getType(true); description += " "; - description += versionInfo.getVersion(); + description += versionInfo.getVersionString(); description += " - "; description += versionInfo.getDate(); description += ", "; @@ -428,7 +428,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 (gotImage) { diff --git a/src/system/flashtool.cpp b/src/system/flashtool.cpp index f0db0348e..12ccbb1ff 100644 --- a/src/system/flashtool.cpp +++ b/src/system/flashtool.cpp @@ -463,23 +463,21 @@ CFlashVersionInfo::CFlashVersionInfo(const std::string & _versionString) snapshot = versionString[0]; // recover release cycle version + // will be compared with RELEASE_CYCLE, which is defined in configure.ac as "x.0" releaseCycle[0] = versionString[1]; releaseCycle[1] = '.'; -/* - if (versionString[2] == '0') - { - releaseCycle[2] = versionString[3]; - releaseCycle[3] = 0; - } - else -*/ - { - releaseCycle[2] = versionString[2]; - releaseCycle[3] = versionString[3]; - releaseCycle[4] = 0; - } + releaseCycle[2] = '0'; + releaseCycle[3] = 0; + + // human readable version + vstring[0] = versionString[1]; + vstring[1] = '.'; + vstring[2] = versionString[2]; + vstring[3] = versionString[3]; + vstring[4] = 0; + + version = atoi(&versionString[1])*100 + atoi(&versionString[2])*10 + atoi(&versionString[3]); - version = atoi(&releaseCycle[0]) * 100 + atoi(&releaseCycle[2]); // recover date struct tm tt; memset(&tt, 0, sizeof(tt)); @@ -561,6 +559,11 @@ int CFlashVersionInfo::getVersion(void) const return version; } +const char *CFlashVersionInfo::getVersionString(void) const +{ + return vstring; +} + //----------------------------------------------------------------------------------------------------------------- CMTDInfo::CMTDInfo() diff --git a/src/system/flashtool.h b/src/system/flashtool.h index 86a1a3b97..7fb6bd2dc 100644 --- a/src/system/flashtool.h +++ b/src/system/flashtool.h @@ -79,7 +79,8 @@ class CFlashVersionInfo char date[11]; char time[6]; - char releaseCycle[5]; + char releaseCycle[4]; + char vstring[5]; // human readable version int version; time_t datetime; @@ -92,7 +93,8 @@ class CFlashVersionInfo const char *getTime(void) const; const char *getReleaseCycle(void) const; const char *getType(bool localized = false) const; - int getVersion(void) const; + int getVersion(void) const; + const char *getVersionString(void) const; time_t getDateTime(void) const { return datetime; }; };