From e15de53f15a7135d462f0b244029d7cbed87ae09 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Thu, 27 Aug 2009 16:21:39 +0000 Subject: [PATCH] GUI: Small change git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4082 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp | 14 ++++++-------- Source/Core/DolphinWX/Src/Frame.cpp | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp index be8b177b27..cb8e90d8e5 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp @@ -327,15 +327,13 @@ void CCodeWindow::OnChangeFont(wxCommandEvent& event) // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ wxWindow * CCodeWindow::GetNootebookPage(wxString Name) { - if (!Parent->m_NB[0] || !Parent->m_NB[1]) return NULL; - - for(u32 i = 0; i <= Parent->m_NB[0]->GetPageCount(); i++) + for (int i = 0; i < Parent->m_NB.size(); i++) { - if (Parent->m_NB[0]->GetPageText(i).IsSameAs(Name)) return Parent->m_NB[0]->GetPage(i); - } - for(u32 i = 0; i <= Parent->m_NB[1]->GetPageCount(); i++) - { - if (Parent->m_NB[1]->GetPageText(i).IsSameAs(Name)) return Parent->m_NB[1]->GetPage(i); + if (!Parent->m_NB[i]) return NULL; + for(u32 j = 0; j <= Parent->m_NB[j]->GetPageCount(); j++) + { + if (Parent->m_NB[i]->GetPageText(j).IsSameAs(Name)) return Parent->m_NB[i]->GetPage(j); + } } return NULL; } diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 6ea4934e65..57435b5b77 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -372,7 +372,7 @@ CFrame::CFrame(bool showLogWindow, m_Panel = new CPanel(this, IDM_MPANEL); //wxPanel * m_Panel2 = new wxPanel(this, wxID_ANY); - static int Style = wxAUI_NB_TOP | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ACTIVE_TAB | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER; + static int Style = wxAUI_NB_TOP | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER; wxBitmap aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)); if (UseDebugger)