Fix a memory leak in the breakpoint window.

Parent message alerts by the active window.  This way if another window is open it isn't pushed behind the main window.  We probably should parent the message alerts by the calling window instead, but this may be good enough.
Make sure there is only one instance of some modeless windows (Cheats Manager and Net Play).


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7257 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-02-27 02:27:43 +00:00
parent 449e79aea5
commit 217ee43063
12 changed files with 98 additions and 78 deletions

View File

@ -96,11 +96,6 @@ extern "C" {
#include "../resources/KDE.h"
};
// Other Windows
wxCheatsWindow* CheatsWindow;
// Create menu items
// ---------------------
void CFrame::CreateMenu()
@ -1274,7 +1269,15 @@ void CFrame::StatusBarMessage(const char * Text, ...)
// NetPlay stuff
void CFrame::OnNetPlay(wxCommandEvent& WXUNUSED (event))
{
new NetPlaySetupDiag(this, m_GameListCtrl);
if (!g_NetPlaySetupDiag)
{
if (NetPlayDiag::GetInstance() != NULL)
NetPlayDiag::GetInstance()->Raise();
else
g_NetPlaySetupDiag = new NetPlaySetupDiag(this, m_GameListCtrl);
}
else
g_NetPlaySetupDiag->Raise();
}
void CFrame::OnMemcard(wxCommandEvent& WXUNUSED (event))
@ -1300,7 +1303,10 @@ void CFrame::OnImportSave(wxCommandEvent& WXUNUSED (event))
void CFrame::OnShow_CheatsWindow(wxCommandEvent& WXUNUSED (event))
{
CheatsWindow = new wxCheatsWindow(this);
if (!g_CheatsWindow)
g_CheatsWindow = new wxCheatsWindow(this);
else
g_CheatsWindow->Raise();
}
void CFrame::OnLoadWiiMenu(wxCommandEvent& event)