summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Frame.cpp
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-08-19 10:17:33 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-08-19 10:37:47 -0400
commit6dbafa92389f52c6bd0140b4525b563fe74af0f2 (patch)
treee0295285c726188fb94592c7638c38dda53516a9 /Source/Core/DolphinWX/Frame.cpp
parent3bad4bcfdb17d1dacb8900f0d13294da21d82fde (diff)
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.
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index b710ba07cb..126cb3ea74 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -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: