Core: Move the titlebar / statusbar abstraction to DolphinWX

The concept of a "title bar" / "status bar" shouldn't be a core concept,
so remove the Host_UpdateStatusBar function, and move the code handles
whether to update the status bar or titlebar into DolphinWX.
This commit is contained in:
Jasper St. Pierre
2014-08-19 10:17:33 -04:00
parent 3bad4bcfdb
commit 6dbafa9238
7 changed files with 18 additions and 29 deletions

View File

@ -628,6 +628,21 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
}
#endif
void CFrame::UpdateTitle(const std::string &str)
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
SConfig::GetInstance().m_InterfaceStatusbar)
{
GetStatusBar()->SetStatusText(str, 0);
m_RenderFrame->SetTitle(scm_rev_str);
}
else
{
std::string titleStr = StringFromFormat("%s | %s", scm_rev_str, str.c_str());
m_RenderFrame->SetTitle(titleStr);
}
}
void CFrame::OnHostMessage(wxCommandEvent& event)
{
switch (event.GetId())
@ -642,8 +657,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
break;
case IDM_UPDATETITLE:
if (m_RenderFrame != nullptr)
m_RenderFrame->SetTitle(event.GetString());
SetTitle(event.GetString());
break;
case IDM_WINDOWSIZEREQUEST: