mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
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:
@ -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:
|
||||
|
Reference in New Issue
Block a user