diff options
| author | Lioncash <mathew1800@gmail.com> | 2013-04-08 01:16:50 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2013-04-08 01:16:50 -0400 |
| commit | 1db10b139cb1f9b92b2e90eb86f236dcd30333b4 (patch) | |
| tree | 6e1564d368ffabc06196e82d41413fe83082b184 /Source/Core/DolphinWX/Src/FrameTools.cpp | |
| parent | 5b2d9a7d9f80389cd130661c481dcbdf650a724f (diff) | |
Remove all tab/space mismatches from the DolphinWX project (at least 99%. I promise!)
Also fix up the dangling else's. Shit just looks incredibly ugly in terms of actual structure in the code.
I took the liberty of adding comments in FifoPlayerDlg.cpp, LogConfigWindow.cpp, LogWindow.cpp, and FrameAui.cpp to better explain some things.
If any comments are wrong, don't hesitate to complain.
Diffstat (limited to 'Source/Core/DolphinWX/Src/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Src/FrameTools.cpp | 66 |
1 files changed, 54 insertions, 12 deletions
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 7626e1b62e..fe69b9a7f8 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -177,10 +177,12 @@ void CFrame::CreateMenu() loadMenu->Append(IDM_UNDOLOADSTATE, _("Undo Load State") + wxString(wxT("\tShift+F12"))); loadMenu->AppendSeparator(); - for (int i = 1; i <= 8; i++) { + for (int i = 1; i <= 8; i++) + { loadMenu->Append(IDM_LOADSLOT1 + i - 1, GetMenuLabel(HK_LOAD_STATE_SLOT_1 + i - 1)); saveMenu->Append(IDM_SAVESLOT1 + i - 1, GetMenuLabel(HK_SAVE_STATE_SLOT_1 + i - 1)); } + m_MenuBar->Append(emulationMenu, _("&Emulation")); // Options menu @@ -297,7 +299,10 @@ void CFrame::CreateMenu() viewMenu->Append(IDM_PURGECACHE, _("Purge Cache")); m_MenuBar->Append(viewMenu, _("&View")); - if (g_pCodeWindow) g_pCodeWindow->CreateMenu(SConfig::GetInstance().m_LocalCoreStartupParameter, m_MenuBar); + if (g_pCodeWindow) + { + g_pCodeWindow->CreateMenu(SConfig::GetInstance().m_LocalCoreStartupParameter, m_MenuBar); + } // Help menu wxMenu* helpMenu = new wxMenu; @@ -428,8 +433,8 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar) { int w = m_Bitmaps[Toolbar_FileOpen].GetWidth(), h = m_Bitmaps[Toolbar_FileOpen].GetHeight(); - ToolBar->SetToolBitmapSize(wxSize(w, h)); - + ToolBar->SetToolBitmapSize(wxSize(w, h)); + ToolBar->AddTool(wxID_OPEN, _("Open"), m_Bitmaps[Toolbar_FileOpen], _("Open file...")); ToolBar->AddTool(wxID_REFRESH, _("Refresh"), m_Bitmaps[Toolbar_Refresh], _("Refresh game list")); @@ -558,12 +563,16 @@ void CFrame::BootGame(const std::string& filename) } else if (!StartUp.m_strDefaultGCM.empty() && wxFileExists(wxSafeConvertMB2WX(StartUp.m_strDefaultGCM.c_str()))) + { bootfile = StartUp.m_strDefaultGCM; + } else { if (!SConfig::GetInstance().m_LastFilename.empty() && wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str()))) + { bootfile = SConfig::GetInstance().m_LastFilename; + } else { m_GameListCtrl->BrowseForDirectory(); @@ -608,7 +617,9 @@ void CFrame::DoOpen(bool Boot) // Should we boot a new game or just change the disc? if (Boot && !path.IsEmpty()) + { BootGame(WxStrToStr(path)); + } else { DVDInterface::ChangeDisc(WxStrToStr(path).c_str()); @@ -666,7 +677,8 @@ void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event)) GetMenuBar()->FindItem(IDM_RECORDREADONLY)->Check(false); } - for (int i = 0; i < 4; i++) { + for (int i = 0; i < 4; i++) + { if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER || SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_TARUKONGA) controllers |= (1 << i); @@ -726,11 +738,15 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event)) UpdateGUI(); } else + { DoPause(); + } } else + { // Core is uninitialized, start the game BootGame(std::string("")); + } } void CFrame::OnRenderParentClose(wxCloseEvent& event) @@ -757,7 +773,7 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event) { int width, height; if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && - !RendererIsFullscreen() && !m_RenderFrame->IsMaximized() && !m_RenderFrame->IsIconized()) + !RendererIsFullscreen() && !m_RenderFrame->IsMaximized() && !m_RenderFrame->IsIconized()) { m_RenderFrame->GetClientSize(&width, &height); SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth = width; @@ -920,13 +936,19 @@ void CFrame::OnBootDrive(wxCommandEvent& event) // Refresh the file list and browse for a favorites directory void CFrame::OnRefresh(wxCommandEvent& WXUNUSED (event)) { - if (m_GameListCtrl) m_GameListCtrl->Update(); + if (m_GameListCtrl) + { + m_GameListCtrl->Update(); + } } void CFrame::OnBrowse(wxCommandEvent& WXUNUSED (event)) { - if (m_GameListCtrl) m_GameListCtrl->BrowseForDirectory(); + if (m_GameListCtrl) + { + m_GameListCtrl->BrowseForDirectory(); + } } // Create screenshot @@ -1127,7 +1149,9 @@ void CFrame::OnConfigPAD(wxCommandEvent& WXUNUSED (event)) InputPlugin *const pad_plugin = Pad::GetPlugin(); bool was_init = false; if (g_controller_interface.IsInit()) // check if game is running + { was_init = true; + } else { #if defined(HAVE_X11) && HAVE_X11 @@ -1153,7 +1177,9 @@ void CFrame::OnConfigWiimote(wxCommandEvent& WXUNUSED (event)) InputPlugin *const wiimote_plugin = Wiimote::GetPlugin(); bool was_init = false; if (g_controller_interface.IsInit()) // check if game is running + { was_init = true; + } else { #if defined(HAVE_X11) && HAVE_X11 @@ -1204,7 +1230,10 @@ void CFrame::OnHelp(wxCommandEvent& event) void CFrame::ClearStatusBar() { - if (this->GetStatusBar()->IsEnabled()) this->GetStatusBar()->SetStatusText(wxT(""),0); + if (this->GetStatusBar()->IsEnabled()) + { + this->GetStatusBar()->SetStatusText(wxT(""),0); + } } void CFrame::StatusBarMessage(const char * Text, ...) @@ -1216,7 +1245,10 @@ void CFrame::StatusBarMessage(const char * Text, ...) vsnprintf(Str, MAX_BYTES, Text, ArgPtr); va_end(ArgPtr); - if (this->GetStatusBar()->IsEnabled()) this->GetStatusBar()->SetStatusText(StrToWxStr(Str),0); + if (this->GetStatusBar()->IsEnabled()) + { + this->GetStatusBar()->SetStatusText(StrToWxStr(Str),0); + } } @@ -1233,7 +1265,9 @@ void CFrame::OnNetPlay(wxCommandEvent& WXUNUSED (event)) g_NetPlaySetupDiag = new NetPlaySetupDiag(this, m_GameListCtrl); } else + { g_NetPlaySetupDiag->Raise(); + } } void CFrame::OnMemcard(wxCommandEvent& WXUNUSED (event)) @@ -1618,7 +1652,11 @@ void CFrame::UpdateGUI() m_bGameLoading = false; } - if (m_ToolBar) m_ToolBar->Refresh(); + // Refresh toolbar + if (m_ToolBar) + { + m_ToolBar->Refresh(); + } // Commit changes to manager m_Mgr->Update(); @@ -1685,7 +1723,11 @@ void CFrame::GameListChanged(wxCommandEvent& event) break; } - if (m_GameListCtrl) m_GameListCtrl->Update(); + // Update gamelist + if (m_GameListCtrl) + { + m_GameListCtrl->Update(); + } } // Enable and disable the toolbar |
