Hide commit information when none exists

This commit is contained in:
Zero-One101 2016-01-17 16:10:33 +00:00 committed by Phillip Stephens
parent adf31e36d1
commit d936ce69ab
1 changed files with 10 additions and 4 deletions

View File

@ -24,10 +24,6 @@ SplashScreen::SplashScreen(ViewManager& vm, Specter::ViewResources& res)
m_vm(vm), m_vm(vm),
m_textColor(res.themeData().uiText()), m_textColor(res.themeData().uiText()),
m_textColorClear(m_textColor), m_textColorClear(m_textColor),
m_buildInfoStr(HECL::Format("%s: %s\n%s: %s\n%s: %s",
vm.translateOr("branch", "Branch").c_str(), GIT_BRANCH,
vm.translateOr("commit", "Commit").c_str(), GIT_COMMIT_HASH,
vm.translateOr("date", "Date").c_str(), GIT_COMMIT_DATE)),
m_newString(m_vm.translateOr("new_project", "New Project")), m_newString(m_vm.translateOr("new_project", "New Project")),
m_newProjBind(*this), m_newProjBind(*this),
m_openString(m_vm.translateOr("open_project", "Open Project")), m_openString(m_vm.translateOr("open_project", "Open Project")),
@ -35,6 +31,16 @@ SplashScreen::SplashScreen(ViewManager& vm, Specter::ViewResources& res)
m_extractString(m_vm.translateOr("extract_game", "Extract Game")), m_extractString(m_vm.translateOr("extract_game", "Extract Game")),
m_extractProjBind(*this) m_extractProjBind(*this)
{ {
if (GIT_COMMIT_DATE[0] != '\0' &&
GIT_COMMIT_HASH[0] != '\0' &&
GIT_BRANCH[0] != '\0')
{
m_buildInfoStr = HECL::Format("%s: %s\n%s: %s\n%s: %s",
vm.translateOr("branch", "Branch").c_str(), GIT_BRANCH,
vm.translateOr("commit", "Commit").c_str(), GIT_COMMIT_HASH,
vm.translateOr("date", "Date").c_str(), GIT_COMMIT_DATE);
}
m_openProjBind.m_openRecentMenuRoot.m_text = vm.translateOr("recent_projects", "Recent Projects"); m_openProjBind.m_openRecentMenuRoot.m_text = vm.translateOr("recent_projects", "Recent Projects");
m_textColorClear[3] = 0.0; m_textColorClear[3] = 0.0;
commitResources(res); commitResources(res);