GUI: Simplified away the notebook vector, bugfixes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4112 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-08-30 22:04:30 +00:00
parent 6b97c0b764
commit 63786d5438
5 changed files with 124 additions and 85 deletions

View File

@ -618,6 +618,11 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
wxMenuItem* pRegister = pDebugDialogs->Append(IDM_REGISTERWINDOW, _T("&Registers"), wxEmptyString, wxITEM_CHECK);
pRegister->Check(bRegisterWindow);
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
Console->Log(LogTypes::LCUSTOM, StringFromFormat(
"bRegisterWindow: %i\n", bRegisterWindow).c_str());
wxMenuItem* pBreakPoints = pDebugDialogs->Append(IDM_BREAKPOINTWINDOW, _T("&BreakPoints"), wxEmptyString, wxITEM_CHECK);
pBreakPoints->Check(bBreakpointWindow);
wxMenuItem* pMemory = pDebugDialogs->Append(IDM_MEMORYWINDOW, _T("&Memory"), wxEmptyString, wxITEM_CHECK);

View File

@ -406,11 +406,11 @@ void CCodeWindow::OnToggleSoundWindow(bool Show, int i)
if (Show)
{
if (Parent->m_NB.size() == 0) return;
if (i < 0 || i > Parent->m_NB.size()-1) i = 0;
if (Parent->GetNotebookCount() == 0) return;
if (i < 0 || i > Parent->GetNotebookCount()-1) i = 0;
#ifdef _WIN32
wxWindow *Win = Parent->GetWxWindow(wxT("Sound"));
if (Win && Parent->m_NB[i]->GetPageIndex(Win) != wxNOT_FOUND) return;
if (Win && Parent->GetNotebook(i)->GetPageIndex(Win) != wxNOT_FOUND) return;
{
#endif
@ -428,7 +428,7 @@ void CCodeWindow::OnToggleSoundWindow(bool Show, int i)
if (Win)
{
//Console->Log(LogTypes::LNOTICE, StringFromFormat("AddPage\n").c_str());
Parent->m_NB[i]->AddPage(Win, wxT("Sound"), true, Parent->aNormalFile );
Parent->GetNotebook(i)->AddPage(Win, wxT("Sound"), true, Parent->aNormalFile );
}
#endif
}
@ -436,7 +436,7 @@ void CCodeWindow::OnToggleSoundWindow(bool Show, int i)
{
#ifdef _WIN32
wxWindow *Win = Parent->GetWxWindow(wxT("Sound"));
Parent->DoRemovePage (Win, false);
Parent->DoRemovePage(Win, false);
#endif
// Close the sound dll that has an open debugger
CPluginManager::GetInstance().OpenDebug(
@ -454,10 +454,11 @@ void CCodeWindow::OnToggleVideoWindow(bool Show, int i)
if (Show)
{
if (i < 0 || i > Parent->m_NB.size()-1) return;
if (Parent->GetNotebookCount() == 0) return;
if (i < 0 || i > Parent->GetNotebookCount()-1) i = 0;
#ifdef _WIN32
wxWindow *Win = Parent->GetWxWindow(wxT("Video"));
if (Win && Parent->m_NB[i]->GetPageIndex(Win) != wxNOT_FOUND) return;
if (Win && Parent->GetNotebook(i)->GetPageIndex(Win) != wxNOT_FOUND) return;
{
#endif
@ -471,7 +472,7 @@ void CCodeWindow::OnToggleVideoWindow(bool Show, int i)
}
Win = Parent->GetWxWindow(wxT("Video"));
if (Win) Parent->m_NB[i]->AddPage(Win, wxT("Video"), true, Parent->aNormalFile );
if (Win) Parent->GetNotebook(i)->AddPage(Win, wxT("Video"), true, Parent->aNormalFile );
#endif
}
else // hide