wxgui [Linux]: Updated project files, fixed docking logic.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1532 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-07-16 13:44:40 +00:00
parent bea9aa2d15
commit 539a35fe80
5 changed files with 40 additions and 63 deletions

View File

@ -215,7 +215,6 @@
<Unit filename="../RecoverySystem.cpp" />
<Unit filename="../SPR.cpp" />
<Unit filename="../SPR.h" />
<Unit filename="../SafeArray.h" />
<Unit filename="../SamplProf.h" />
<Unit filename="../SaveState.cpp" />
<Unit filename="../SaveState.h" />
@ -231,7 +230,6 @@
<Unit filename="../StringUtils.h" />
<Unit filename="../System.cpp" />
<Unit filename="../System.h" />
<Unit filename="../Threading.h" />
<Unit filename="../Utilities/AsciiFile.h" />
<Unit filename="../Utilities/FileUtils.cpp" />
<Unit filename="../Utilities/folderdesc.txt" />
@ -251,8 +249,6 @@
<Unit filename="../Vif.h" />
<Unit filename="../VifDma.cpp" />
<Unit filename="../VifDma.h" />
<Unit filename="../gui/AboutBoxDialog.cpp" />
<Unit filename="../gui/AboutBoxDialog.h" />
<Unit filename="../gui/AdvancedDialog.cpp" />
<Unit filename="../gui/AdvancedDialog.h" />
<Unit filename="../gui/App.h" />
@ -260,16 +256,16 @@
<Unit filename="../gui/CheckedStaticBox.cpp" />
<Unit filename="../gui/CheckedStaticBox.h" />
<Unit filename="../gui/ConsoleLogger.cpp" />
<Unit filename="../gui/Dialogs/AboutBoxDialog.cpp" />
<Unit filename="../gui/Dialogs/ConfigurationDialog.cpp" />
<Unit filename="../gui/Dialogs/ConfigurationDialog.h" />
<Unit filename="../gui/Dialogs/LogOptionsDialog.cpp" />
<Unit filename="../gui/Dialogs/LogOptionsDialog.h" />
<Unit filename="../gui/Dialogs/ModalPopups.h" />
<Unit filename="../gui/Dialogs/PickUserModeDialog.cpp" />
<Unit filename="../gui/GameFixesDialog.h" />
<Unit filename="../gui/HostGui.cpp" />
<Unit filename="../gui/IniInterface.cpp" />
<Unit filename="../gui/IniInterface.h" />
<Unit filename="../gui/LogOptionsDialog.cpp" />
<Unit filename="../gui/LogOptionsDialog.h" />
<Unit filename="../gui/MainFrame.cpp" />
<Unit filename="../gui/MainFrame.h" />
<Unit filename="../gui/Panels/AudioPanel.cpp" />
@ -290,7 +286,6 @@
<Unit filename="../gui/Resources/ConfigIcon_Video.h" />
<Unit filename="../gui/Resources/EmbeddedImage.h" />
<Unit filename="../gui/Resources/ps2_silver.h" />
<Unit filename="../gui/SpeedHacksDialog.h" />
<Unit filename="../gui/i18n.cpp" />
<Unit filename="../gui/i18n.h" />
<Unit filename="../gui/main.cpp" />
@ -339,9 +334,6 @@
<Unit filename="../x86/iR5900Shift.h" />
<Unit filename="../x86/iVU0micro.cpp" />
<Unit filename="../x86/iVU1micro.cpp" />
<Unit filename="../x86/iVUmicro.h" />
<Unit filename="../x86/iVUops.h" />
<Unit filename="../x86/iVUzerorec.h" />
<Unit filename="../x86/iVif.cpp" />
<Unit filename="../x86/ir5900tables.cpp" />
<Unit filename="../x86/ix86-32/aR5900-32.S" />
@ -357,33 +349,8 @@
<Unit filename="../x86/ix86-32/iR5900Shift.cpp" />
<Unit filename="../x86/ix86-32/iR5900Templates.cpp" />
<Unit filename="../x86/ix86-32/recVTLB.cpp" />
<Unit filename="../x86/ix86/implement/dwshift.h" />
<Unit filename="../x86/ix86/implement/group1.h" />
<Unit filename="../x86/ix86/implement/group2.h" />
<Unit filename="../x86/ix86/implement/group3.h" />
<Unit filename="../x86/ix86/implement/incdec.h" />
<Unit filename="../x86/ix86/implement/jmpcall.h" />
<Unit filename="../x86/ix86/implement/movs.h" />
<Unit filename="../x86/ix86/implement/test.h" />
<Unit filename="../x86/ix86/implement/xchg.h" />
<Unit filename="../x86/ix86/implement/xmm/arithmetic.h" />
<Unit filename="../x86/ix86/implement/xmm/basehelpers.h" />
<Unit filename="../x86/ix86/implement/xmm/comparisons.h" />
<Unit filename="../x86/ix86/implement/xmm/moremovs.h" />
<Unit filename="../x86/ix86/implement/xmm/shufflepack.h" />
<Unit filename="../x86/ix86/ix86.h" />
<Unit filename="../x86/ix86/ix86_inlines.inl" />
<Unit filename="../x86/ix86/ix86_instructions.h" />
<Unit filename="../x86/ix86/ix86_internal.h" />
<Unit filename="../x86/ix86/ix86_legacy_instructions.h" />
<Unit filename="../x86/ix86/ix86_legacy_internal.h" />
<Unit filename="../x86/ix86/ix86_legacy_types.h" />
<Unit filename="../x86/ix86/ix86_sse_helpers.h" />
<Unit filename="../x86/ix86/ix86_types.h" />
<Unit filename="../x86/ix86/ix86_writers.inl" />
<Unit filename="../x86/microVU.cpp" />
<Unit filename="../x86/microVU.h" />
<Unit filename="../x86/microVU_Alloc.h" />
<Unit filename="../x86/microVU_Alloc.inl" />
<Unit filename="../x86/microVU_Analyze.inl" />
<Unit filename="../x86/microVU_Compile.inl" />

View File

@ -51,7 +51,7 @@ protected:
{
return m_table[(int)coloridx];
}
void SetFont( const wxFont& font );
const wxTextAttr& Default() { return m_table[0]; }
};
@ -60,7 +60,7 @@ protected:
wxTextCtrl& m_TextCtrl;
ColorArray m_ColorTable;
Console::Colors m_curcolor;
public:
// ctor & dtor
ConsoleLogFrame(MainEmuFrame *pParent, const wxString& szTitle);
@ -75,7 +75,7 @@ protected:
virtual void OnClose(wxMenuEvent& event);
virtual void OnSave (wxMenuEvent& event);
virtual void OnClear(wxMenuEvent& event);
void OnWrite( wxCommandEvent& event );
void OnNewline( wxCommandEvent& event );
void OnSetTitle( wxCommandEvent& event );

View File

@ -130,9 +130,9 @@ ConsoleLogFrame::ConsoleLogFrame(MainEmuFrame *parent, const wxString& title) :
// status bar for menu prompts
CreateStatusBar();
ClearColor();
// Sync with configuration settings:
wxASSERT_MSG( g_Conf != NULL, L"Console Log Frames must be created AFTER the configuration has been loaded" );
if( g_Conf != NULL )
{
@ -150,7 +150,7 @@ ConsoleLogFrame::ConsoleLogFrame(MainEmuFrame *parent, const wxString& title) :
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ConsoleLogFrame::OnCloseWindow) );
Connect( wxEVT_MOVE, wxMoveEventHandler(ConsoleLogFrame::OnMoveAround) );
Connect( wxEVT_SIZE, wxSizeEventHandler(ConsoleLogFrame::OnResize) );
Connect( wxEVT_LOG_Write, wxCommandEventHandler(ConsoleLogFrame::OnWrite) );
Connect( wxEVT_LOG_Newline, wxCommandEventHandler(ConsoleLogFrame::OnNewline) );
Connect( wxEVT_SetTitleText, wxCommandEventHandler(ConsoleLogFrame::OnSetTitle) );
@ -170,6 +170,7 @@ void ConsoleLogFrame::OnMoveAround( wxMoveEvent& evt )
wxRect snapzone( topright - wxSize( 8,8 ), wxSize( 16,16 ) );
g_Conf->ConLogBox.AutoDock = snapzone.Contains( GetPosition() );
Console::WriteLn( "DockCheck: %d", params g_Conf->ConLogBox.AutoDock );
if( g_Conf->ConLogBox.AutoDock )
{
SetPosition( topright + wxSize( 1,0 ) );
@ -201,9 +202,9 @@ void ConsoleLogFrame::OnOpen(wxMenuEvent& WXUNUSED(event))
void ConsoleLogFrame::OnClose( wxMenuEvent& event )
{
DoClose();
}
void ConsoleLogFrame::OnCloseWindow(wxCloseEvent& event)
{
if( event.CanVeto() )
@ -256,7 +257,7 @@ void ConsoleLogFrame::ClearColor()
void ConsoleLogFrame::OnWrite( wxCommandEvent& event )
{
Colors color = (Colors)event.GetExtraLong();
if( color != m_curcolor )
m_TextCtrl.SetDefaultStyle( m_ColorTable[m_curcolor=color] );
@ -275,6 +276,7 @@ void ConsoleLogFrame::OnSetTitle( wxCommandEvent& event )
void ConsoleLogFrame::OnDockedMove( wxCommandEvent& event )
{
Console::Error( "Dock Message: %d, %d", params g_Conf->ConLogBox.DisplayPosition.x, g_Conf->ConLogBox.DisplayPosition.y );
if( g_Conf != NULL )
SetPosition( g_Conf->ConLogBox.DisplayPosition );
}

View File

@ -83,7 +83,7 @@ wxMenu* MainEmuFrame::MakeIsoMenu()
// Add in the recent files!
/*const StringListNode* cruise = g_Conf->RecentIsos;
int i = 0;
int threshold = 15;
while( cruise != NULL && (--threshold >= 0) )
@ -95,7 +95,7 @@ wxMenu* MainEmuFrame::MakeIsoMenu()
// Ellipsize it!
wxFileName src( *cruise->item );
ellipsized = src.GetVolume() + wxFileName::GetVolumeSeparator() + wxFileName::GetPathSeparator() + L"...";
const wxArrayString& dirs( src.GetDirs() );
int totalLen = ellipsized.Length();
int i=dirs.Count()-1;
@ -116,7 +116,7 @@ wxMenu* MainEmuFrame::MakeIsoMenu()
mnuIso->Append( Menu_Iso_Recent+i, Path::GetFilename( ellipsized ), *cruise->item );
}*/
if( g_RecentIsoList != NULL )
{
g_RecentIsoList->UseMenu( mnuIso );
@ -174,17 +174,23 @@ void MainEmuFrame::OnCloseWindow(wxCloseEvent& evt)
void MainEmuFrame::OnMoveAround( wxMoveEvent& evt )
{
// wxGTK note: X sends gratuitous amounts of OnMove messages for various crap actions
// like selecting or deselecting a window, which muck up docking logic. We filter them
// out using 'lastpos' here. :)
static wxPoint lastpos( wxDefaultCoord, wxDefaultCoord );
if( lastpos == evt.GetPosition() ) return;
lastpos = evt.GetPosition();
if( g_Conf->ConLogBox.AutoDock )
{
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 );
wxCommandEvent conevt( wxEVT_DockConsole );
wxGetApp().ProgramLog_PostEvent( conevt );
}
g_Conf->MainGuiPosition = GetPosition();
Console::Error( "XWindows Messages Suck: %d, %d", params GetPosition().x, GetPosition().y );
g_Conf->MainGuiPosition = evt.GetPosition();
//evt.Skip();
}
@ -203,7 +209,7 @@ void MainEmuFrame::ConnectMenus()
ConnectMenu( Menu_Config_Settings, Menu_ConfigSettings_Click );
ConnectMenu( Menu_RunWithoutDisc, Menu_RunWithoutDisc_Click );
ConnectMenu( Menu_IsoBrowse, Menu_IsoBrowse_Click );
Connect( wxID_FILE1, wxID_FILE1+20, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainEmuFrame::Menu_IsoRecent_Click) );
@ -390,7 +396,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons
m_menuDebug.Append(Menu_Debug_Logging, _T("Logging..."), wxEmptyString, wxITEM_NORMAL);
m_MenuItem_Console.Check( g_Conf->ConLogBox.Visible );
ConnectMenus();
Connect( wxEVT_MOVE, wxMoveEventHandler (MainEmuFrame::OnMoveAround) );
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler(MainEmuFrame::OnCloseWindow) );
@ -470,7 +476,7 @@ void MainEmuFrame::Menu_Debug_Logging_Click(wxCommandEvent &event)
void MainEmuFrame::Menu_ShowConsole(wxCommandEvent &event)
{
// Use messages to relay open/close commands (thread-safe)
g_Conf->ConLogBox.Visible = event.IsChecked();
wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED, g_Conf->ConLogBox.Visible ? wxID_OPEN : wxID_CLOSE );
wxGetApp().ProgramLog_PostEvent( evt );

View File

@ -5,12 +5,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@ -47,10 +47,12 @@ microVUx(void) __mVUdumpProgram(int progIndex) {
int bCode = mVU->code;
int bPC = iPC;
mVUbranch = 0;
// fixme: This needs recdone using wxFile and wxString
sprintf(str, "%s\\microVU%d prog - %02d.html", LOGS_DIR, vuIndex, progIndex);
sprintf(str, "%s\\microVU%d prog - %02d.html", "logs", vuIndex, progIndex);
mVU->logFile = fopen(str, "w");
mVUlog("<html>\n");
mVUlog("<title>microVU%d MicroProgram Log</title>\n", vuIndex);
mVUlog("<body bgcolor=\"#000000\" LINK=\"#1111ff\" VLINK=\"#1111ff\">\n");
@ -90,8 +92,8 @@ microVUx(void) __mVUdumpProgram(int progIndex) {
mVUlog("[%04x] (%08x)</a> ", i*4, mVU->code);
mVUopU(mVU, 2);
if (bitX[5]) {
mVUlog(" (");
if (bitX[5]) {
mVUlog(" (");
if (bitX[0]) { mVUlog("I"); bitX[6] = 1; }
if (bitX[1]) { commaIf(); mVUlog("E"); bitX[6] = 1; }
if (bitX[2]) { commaIf(); mVUlog("M"); bitX[6] = 1; }