From bea9aa2d15df304f3e2fcfac9cceec00cfa29cb6 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Thu, 16 Jul 2009 10:25:24 +0000 Subject: [PATCH] wxgui: minor code cleanups. git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1530 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/ConsoleLogger.cpp | 3 +++ pcsx2/gui/{ => Dialogs}/AboutBoxDialog.cpp | 0 pcsx2/gui/{ => Dialogs}/LogOptionsDialog.cpp | 0 pcsx2/gui/{ => Dialogs}/LogOptionsDialog.h | 0 pcsx2/gui/MainFrame.cpp | 12 +++++++----- pcsx2/windows/VCprojects/pcsx2_2008.vcproj | 6 +++--- 6 files changed, 13 insertions(+), 8 deletions(-) rename pcsx2/gui/{ => Dialogs}/AboutBoxDialog.cpp (100%) rename pcsx2/gui/{ => Dialogs}/LogOptionsDialog.cpp (100%) rename pcsx2/gui/{ => Dialogs}/LogOptionsDialog.h (100%) diff --git a/pcsx2/gui/ConsoleLogger.cpp b/pcsx2/gui/ConsoleLogger.cpp index 3d2d68b541..95ce12e870 100644 --- a/pcsx2/gui/ConsoleLogger.cpp +++ b/pcsx2/gui/ConsoleLogger.cpp @@ -176,6 +176,7 @@ void ConsoleLogFrame::OnMoveAround( wxMoveEvent& evt ) g_Conf->ConLogBox.AutoDock = true; } } + g_Conf->ConLogBox.DisplayPosition = GetPosition(); evt.Skip(); } @@ -289,6 +290,8 @@ void ConsoleLogFrame::Write( const wxString& text ) m_TextCtrl.AppendText( text ); } +////////////////////////////////////////////////////////////////////////////////////////// + namespace Console { __threadlocal Colors th_CurrentColor = Color_Black; diff --git a/pcsx2/gui/AboutBoxDialog.cpp b/pcsx2/gui/Dialogs/AboutBoxDialog.cpp similarity index 100% rename from pcsx2/gui/AboutBoxDialog.cpp rename to pcsx2/gui/Dialogs/AboutBoxDialog.cpp diff --git a/pcsx2/gui/LogOptionsDialog.cpp b/pcsx2/gui/Dialogs/LogOptionsDialog.cpp similarity index 100% rename from pcsx2/gui/LogOptionsDialog.cpp rename to pcsx2/gui/Dialogs/LogOptionsDialog.cpp diff --git a/pcsx2/gui/LogOptionsDialog.h b/pcsx2/gui/Dialogs/LogOptionsDialog.h similarity index 100% rename from pcsx2/gui/LogOptionsDialog.h rename to pcsx2/gui/Dialogs/LogOptionsDialog.h diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index 5751ea7041..a02237d4a9 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -18,7 +18,7 @@ #include "PrecompiledHeader.h" #include "MainFrame.h" -#include "LogOptionsDialog.h" +#include "Dialogs/LogOptionsDialog.h" #include "Dialogs/ModalPopups.h" #include "Resources/EmbeddedImage.h" @@ -161,7 +161,7 @@ void MainEmuFrame::PopulatePadMenu() // ------------------------------------------------------------------------ // Close out the console log windows along with the main emu window. -// Note: This event only happens after a close event has occured and was *not* veto'd. Ie, +// Note: This event only happens after a close event has occurred and was *not* veto'd. Ie, // it means it's time to provide an unconditional closure of said window. // void MainEmuFrame::OnCloseWindow(wxCloseEvent& evt) @@ -176,13 +176,15 @@ void MainEmuFrame::OnMoveAround( wxMoveEvent& evt ) { if( g_Conf->ConLogBox.AutoDock ) { - g_Conf->ConLogBox.DisplayPosition = GetPosition() + wxSize( GetSize().x, 0 ); + g_Conf->ConLogBox.DisplayPosition = GetRect().GetTopRight(); // Send the move event our window ID, which allows the logbox to know that this // move event comes from us, and needs a special handler. wxCommandEvent evt( wxEVT_DockConsole ); wxGetApp().ConsoleLog_PostEvent( evt ); } + + g_Conf->MainGuiPosition = GetPosition(); //evt.Skip(); } @@ -462,7 +464,7 @@ void MainEmuFrame::Menu_Debug_MemoryDump_Click(wxCommandEvent &event) void MainEmuFrame::Menu_Debug_Logging_Click(wxCommandEvent &event) { - //LogOptionsDialog( this, wxID_ANY ).ShowModal(); + LogOptionsDialog( this, wxID_ANY ).ShowModal(); } void MainEmuFrame::Menu_ShowConsole(wxCommandEvent &event) @@ -476,5 +478,5 @@ void MainEmuFrame::Menu_ShowConsole(wxCommandEvent &event) void MainEmuFrame::Menu_ShowAboutBox(wxCommandEvent &event) { - //AboutBoxDialog( this, wxID_ANY ).ShowModal(); + AboutBoxDialog( this, wxID_ANY ).ShowModal(); } diff --git a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj index d9dff0ee53..b6c78e9fbc 100644 --- a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj +++ b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj @@ -1978,7 +1978,7 @@ Name="Dialogs" >