mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
imageinfo_ni: smoother view when no .version file is found
Origin commit data
------------------
Branch: ni/coolstream
Commit: 74b5e4acec
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-09-25 (Sun, 25 Sep 2016)
Origin message was:
------------------
- imageinfo_ni: smoother view when no .version file is found
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -222,9 +222,6 @@ void CImageInfoNI::paint()
|
||||
const char * head_string;
|
||||
int xpos = x+10;
|
||||
|
||||
std::ostringstream imageversion;
|
||||
std::ostringstream commits;
|
||||
|
||||
ypos = y;
|
||||
|
||||
head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD);
|
||||
@@ -241,52 +238,56 @@ void CImageInfoNI::paint()
|
||||
CConfigFile config('\t');
|
||||
config.loadConfig("/.version");
|
||||
|
||||
std::string imagename = config.getString("imagename", "NI-Neutrino-HD");
|
||||
std::string homepage = config.getString("homepage", "www.neutrino-images.de");
|
||||
std::string creator = config.getString("creator", "NI-Team");
|
||||
std::string version = config.getString("version", "no version");
|
||||
std::string origin_commit = config.getString("origin-commit", "no commit");
|
||||
std::string builddate = config.getString("builddate", "no builddate");
|
||||
std::string imagename = config.getString("imagename", "NI-Neutrino-HD");
|
||||
std::string homepage = config.getString("homepage", "www.neutrino-images.de");
|
||||
std::string creator = config.getString("creator", "NI-Team");
|
||||
std::string version = config.getString("version", "n/a");
|
||||
std::string commit = config.getString("commit", "n/a");
|
||||
std::string builddate = config.getString("builddate", "n/a");
|
||||
|
||||
static CFlashVersionInfo versionInfo(version);
|
||||
std::string releaseCycle = versionInfo.getReleaseCycle();
|
||||
std::ostringstream imageversion;
|
||||
imageversion.str("n/a");
|
||||
|
||||
struct utsname uts_info;
|
||||
|
||||
imageversion << releaseCycle << " (" << versionInfo.getType() << ")";
|
||||
commits << "NI: " << origin_commit;
|
||||
if (version.compare("n/a") != 0)
|
||||
{
|
||||
static CFlashVersionInfo versionInfo(version);
|
||||
std::string releaseCycle = versionInfo.getReleaseCycle();
|
||||
imageversion.str("");
|
||||
imageversion << releaseCycle << " (" << versionInfo.getType() << ")";
|
||||
}
|
||||
|
||||
ypos += iheight;
|
||||
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_IMAGE));
|
||||
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_IMAGE));
|
||||
paintLine(xpos+offset, font_info, imagename);
|
||||
|
||||
ypos += iheight;
|
||||
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION));
|
||||
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION));
|
||||
paintLine(xpos+offset, font_info, imageversion.str());
|
||||
|
||||
ypos += iheight;
|
||||
paintLine(xpos , font_info, "Commit:");
|
||||
paintLine(xpos+offset, font_info, commits.str());
|
||||
paintLine(xpos, font_info, "Commit:");
|
||||
paintLine(xpos+offset, font_info, commit);
|
||||
|
||||
struct utsname uts_info;
|
||||
|
||||
ypos += iheight;
|
||||
paintLine(xpos , font_info, "Kernel:");
|
||||
paintLine(xpos, font_info, "Kernel:");
|
||||
paintLine(xpos+offset, font_info, uname(&uts_info) < 0 ? "n/a" : uts_info.release);
|
||||
|
||||
ypos += iheight;
|
||||
|
||||
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_DATE));
|
||||
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_DATE));
|
||||
paintLine(xpos+offset, font_info, builddate );
|
||||
|
||||
ypos += iheight;
|
||||
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_CREATOR));
|
||||
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_CREATOR));
|
||||
paintLine(xpos+offset, font_info, creator);
|
||||
|
||||
ypos += iheight;
|
||||
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_HOMEPAGE));
|
||||
paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_HOMEPAGE));
|
||||
paintLine(xpos+offset, font_info, homepage);
|
||||
|
||||
ypos += iheight;
|
||||
|
||||
ypos += sheight;
|
||||
|
||||
get_MTD_Info();
|
||||
|
Reference in New Issue
Block a user