mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +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;
|
const char * head_string;
|
||||||
int xpos = x+10;
|
int xpos = x+10;
|
||||||
|
|
||||||
std::ostringstream imageversion;
|
|
||||||
std::ostringstream commits;
|
|
||||||
|
|
||||||
ypos = y;
|
ypos = y;
|
||||||
|
|
||||||
head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD);
|
head_string = g_Locale->getText(LOCALE_IMAGEINFO_HEAD);
|
||||||
@@ -241,52 +238,56 @@ void CImageInfoNI::paint()
|
|||||||
CConfigFile config('\t');
|
CConfigFile config('\t');
|
||||||
config.loadConfig("/.version");
|
config.loadConfig("/.version");
|
||||||
|
|
||||||
std::string imagename = config.getString("imagename", "NI-Neutrino-HD");
|
std::string imagename = config.getString("imagename", "NI-Neutrino-HD");
|
||||||
std::string homepage = config.getString("homepage", "www.neutrino-images.de");
|
std::string homepage = config.getString("homepage", "www.neutrino-images.de");
|
||||||
std::string creator = config.getString("creator", "NI-Team");
|
std::string creator = config.getString("creator", "NI-Team");
|
||||||
std::string version = config.getString("version", "no version");
|
std::string version = config.getString("version", "n/a");
|
||||||
std::string origin_commit = config.getString("origin-commit", "no commit");
|
std::string commit = config.getString("commit", "n/a");
|
||||||
std::string builddate = config.getString("builddate", "no builddate");
|
std::string builddate = config.getString("builddate", "n/a");
|
||||||
|
|
||||||
static CFlashVersionInfo versionInfo(version);
|
std::ostringstream imageversion;
|
||||||
std::string releaseCycle = versionInfo.getReleaseCycle();
|
imageversion.str("n/a");
|
||||||
|
|
||||||
struct utsname uts_info;
|
|
||||||
|
|
||||||
imageversion << releaseCycle << " (" << versionInfo.getType() << ")";
|
if (version.compare("n/a") != 0)
|
||||||
commits << "NI: " << origin_commit;
|
{
|
||||||
|
static CFlashVersionInfo versionInfo(version);
|
||||||
|
std::string releaseCycle = versionInfo.getReleaseCycle();
|
||||||
|
imageversion.str("");
|
||||||
|
imageversion << releaseCycle << " (" << versionInfo.getType() << ")";
|
||||||
|
}
|
||||||
|
|
||||||
ypos += iheight;
|
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);
|
paintLine(xpos+offset, font_info, imagename);
|
||||||
|
|
||||||
ypos += iheight;
|
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());
|
paintLine(xpos+offset, font_info, imageversion.str());
|
||||||
|
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
paintLine(xpos , font_info, "Commit:");
|
paintLine(xpos, font_info, "Commit:");
|
||||||
paintLine(xpos+offset, font_info, commits.str());
|
paintLine(xpos+offset, font_info, commit);
|
||||||
|
|
||||||
|
struct utsname uts_info;
|
||||||
|
|
||||||
ypos += iheight;
|
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);
|
paintLine(xpos+offset, font_info, uname(&uts_info) < 0 ? "n/a" : uts_info.release);
|
||||||
|
|
||||||
ypos += iheight;
|
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 );
|
paintLine(xpos+offset, font_info, builddate );
|
||||||
|
|
||||||
ypos += iheight;
|
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);
|
paintLine(xpos+offset, font_info, creator);
|
||||||
|
|
||||||
ypos += iheight;
|
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);
|
paintLine(xpos+offset, font_info, homepage);
|
||||||
|
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
|
|
||||||
ypos += sheight;
|
ypos += sheight;
|
||||||
|
|
||||||
get_MTD_Info();
|
get_MTD_Info();
|
||||||
|
Reference in New Issue
Block a user