- imageinfo: change handling of yWeb version; use own CConfigFile

This commit is contained in:
svenhoefer
2017-03-03 15:48:31 +01:00
parent c9242679a0
commit 629f91e229
2 changed files with 6 additions and 9 deletions

View File

@@ -310,7 +310,7 @@ void CImageInfo::InitInfoData()
s_api += ", "; s_api += ", ";
#endif #endif
s_api += "yWeb "; s_api += "yWeb ";
s_api += getYApi(); s_api += getYWebVersion();
s_api += ", "; s_api += ", ";
s_api += HTTPD_NAME; s_api += HTTPD_NAME;
s_api += + " "; s_api += + " ";
@@ -462,12 +462,9 @@ void CImageInfo::hide()
} }
} }
string CImageInfo::getYApi() string CImageInfo::getYWebVersion()
{ {
string ret; CConfigFile yV('=', false);
config.loadConfig(Y_VERSION_FILE); yV.loadConfig(PRIVATE_HTTPDDIR "/Y_Version.txt");
ret = config.getString("version", "n/a"); return yV.getString("version", "n/a");
config.loadConfig(VERSION_FILE);
return ret;
} }

View File

@@ -63,7 +63,7 @@ class CImageInfo : public CMenuTarget
std::string getLicenseText(); std::string getLicenseText();
void ShowWindow(); void ShowWindow();
void ScrollLic(bool scrollDown); void ScrollLic(bool scrollDown);
std::string getYApi(); std::string getYWebVersion();
CComponentsWindowMax *cc_win; CComponentsWindowMax *cc_win;
CComponentsForm *cc_info; CComponentsForm *cc_info;