mirror of https://github.com/PCSX2/pcsx2.git
Interface stuffs:
* Enable word wrapping on the console window (maybe could make it an option... hmm). * Slight bugfixes to main window/console focus linking (windows only) * Fix linux compilation error in ZeroGS. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2374 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d7c1caecf1
commit
9ca90c747b
|
@ -148,10 +148,8 @@ int Pcsx2App::IssueModalDialog( const wxString& dlgName )
|
|||
|
||||
if( wxWindow* window = wxFindWindowByName( dlgName ) )
|
||||
{
|
||||
if( wxIsKindOf( window, wxDialog ) )
|
||||
if( wxDialog* dialog = wxDynamicCast( window, wxDialog ) )
|
||||
{
|
||||
wxDialog* dialog = (wxDialog*)window;
|
||||
|
||||
window->SetFocus();
|
||||
|
||||
// It's legal to call ShowModal on a non-modal dialog, therefore making
|
||||
|
|
|
@ -469,17 +469,31 @@ void ConsoleLogFrame::OnResize( wxSizeEvent& evt )
|
|||
evt.Skip();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// OnFocus / OnActivate : Special implementation to "connect" the console log window
|
||||
// with the main frame window. When one is clicked, the other is assured to be brought
|
||||
// to the foreground with it. (Currently only MSW only, as wxWidgets appears to have no
|
||||
// equivalent to this). We don't bother with OnFocus here because it doesn't propagate
|
||||
// up the window hierarchy anyway, so it always gets swallowed by the text control.
|
||||
// But no matter: the console doesn't have the same problem as the Main Window of missing
|
||||
// the initial activation event.
|
||||
|
||||
/*void ConsoleLogFrame::OnFocus( wxFocusEvent& evt )
|
||||
{
|
||||
if( MainEmuFrame* mainframe = GetMainFramePtr() )
|
||||
MSW_SetWindowAfter( mainframe->GetHandle(), GetHandle() );
|
||||
|
||||
evt.Skip();
|
||||
}*/
|
||||
|
||||
void ConsoleLogFrame::OnActivate( wxActivateEvent& evt )
|
||||
{
|
||||
// Special implementation to "connect" the console log window with the main frame
|
||||
// window. When one is clicked, the other is assured to be brought to the foreground
|
||||
// with it. (wxWidgets appears to have no equivalent to this)
|
||||
|
||||
if( MainEmuFrame* mainframe = GetMainFramePtr() )
|
||||
MSW_SetWindowAfter( mainframe->GetHandle(), GetHandle() );
|
||||
|
||||
evt.Skip();
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void ConsoleLogFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
|
|
|
@ -282,8 +282,8 @@ void ModalButtonPanel::OnActionButtonClicked( wxCommandEvent& evt )
|
|||
{
|
||||
evt.Skip();
|
||||
wxWindow* toplevel = wxGetTopLevelParent( this );
|
||||
if( toplevel != NULL && wxIsKindOf(toplevel, wxDialog) )
|
||||
((wxDialog*)toplevel)->EndModal( evt.GetId() );
|
||||
if( wxDialog* dialog = wxDynamicCast( toplevel, wxDialog ) )
|
||||
dialog->EndModal( evt.GetId() );
|
||||
}
|
||||
|
||||
void ModalButtonPanel::AddCustomButton( wxWindowID id, const wxString& label )
|
||||
|
|
|
@ -21,14 +21,12 @@
|
|||
# include <wx/msw/wrapwin.h> // needed for OutputDebugString
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void MSW_SetWindowAfter( WXHWND hwnd, WXHWND hwndAfter )
|
||||
void MSW_SetWindowAfter( WXWidget hwnd, WXWidget hwndAfter )
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
SetWindowPos( (HWND)hwnd, (HWND)hwndAfter, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE );
|
||||
}
|
||||
#else
|
||||
void MSW_SetWindowAfter( GtkWidget *widget, GtkWidget *widgetAfter ){}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Writes text to the Visual Studio Output window (Microsoft Windows only).
|
||||
// On all other platforms this pipes to StdErr instead.
|
||||
|
|
|
@ -15,12 +15,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef __WXMSW__
|
||||
extern void MSW_SetWindowAfter( WXWidget hwnd, WXWidget hwndAfter );
|
||||
#else
|
||||
extern void MSW_SetWindowAfter( GtkWidget *widget, GtkWidget *widgetAfter );
|
||||
#endif
|
||||
|
||||
extern void MSW_OutputDebugString( const wxString& text );
|
||||
|
||||
extern void pxDwm_Load();
|
||||
|
|
|
@ -440,6 +440,9 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
ConnectMenus();
|
||||
Connect( wxEVT_MOVE, wxMoveEventHandler (MainEmuFrame::OnMoveAround) );
|
||||
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler(MainEmuFrame::OnCloseWindow) );
|
||||
|
||||
Connect( wxEVT_SET_FOCUS, wxFocusEventHandler(MainEmuFrame::OnFocus) );
|
||||
|
||||
Connect( wxEVT_ACTIVATE, wxActivateEventHandler(MainEmuFrame::OnActivate) );
|
||||
|
||||
SetDropTarget( new IsoDropTarget( this ) );
|
||||
|
@ -450,16 +453,30 @@ MainEmuFrame::~MainEmuFrame() throw()
|
|||
m_menuCDVD.Remove( MenuId_IsoSelector );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// OnFocus / OnActivate : Special implementation to "connect" the console log window
|
||||
// with the main frame window. When one is clicked, the other is assured to be brought
|
||||
// to the foreground with it. (Currently only MSW only, as wxWidgets appears to have no
|
||||
// equivalent to this). Both OnFocus and OnActivate are handled because Focus events do
|
||||
// not propagate up the window hierarchy, and on Activate events don't always get sent
|
||||
// on the first focusing event after PCSX2 starts.
|
||||
|
||||
void MainEmuFrame::OnFocus( wxFocusEvent& evt )
|
||||
{
|
||||
if( ConsoleLogFrame* logframe = wxGetApp().GetProgramLog() )
|
||||
MSW_SetWindowAfter( logframe->GetHandle(), GetHandle() );
|
||||
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void MainEmuFrame::OnActivate( wxActivateEvent& evt )
|
||||
{
|
||||
// Special implementation to "connect" the console log window with the main frame
|
||||
// window. When one is clicked, the other is assured to be brought to the foreground
|
||||
// with it. (wxWidgets appears to have no equivalent to this)
|
||||
if( ConsoleLogFrame* logframe = wxGetApp().GetProgramLog() )
|
||||
MSW_SetWindowAfter( logframe->GetHandle(), GetHandle() );
|
||||
|
||||
evt.Skip();
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void MainEmuFrame::ApplyCoreStatus()
|
||||
{
|
||||
|
|
|
@ -191,6 +191,7 @@ protected:
|
|||
|
||||
void OnCloseWindow( wxCloseEvent& evt );
|
||||
void OnMoveAround( wxMoveEvent& evt );
|
||||
void OnFocus( wxFocusEvent& evt );
|
||||
void OnActivate( wxActivateEvent& evt );
|
||||
|
||||
void Menu_ConfigSettings_Click(wxCommandEvent &event);
|
||||
|
|
|
@ -49,7 +49,7 @@ void __evt_fastcall pxLogTextCtrl::OnCorePluginStatusChanged( void* obj, PluginE
|
|||
|
||||
pxLogTextCtrl::pxLogTextCtrl( wxWindow* parent )
|
||||
: wxTextCtrl( parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxHSCROLL | wxTE_READONLY | wxTE_RICH2
|
||||
wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2
|
||||
)
|
||||
|
||||
, m_Listener_CoreThreadStatus ( wxGetApp().Source_CoreThreadStatus(), CmdEvt_Listener ( this, OnCoreThreadStatusChanged ) )
|
||||
|
|
|
@ -284,13 +284,6 @@ s32 CALLBACK GSinit()
|
|||
GS_LOG("GSinit\n");
|
||||
#endif
|
||||
|
||||
#ifdef __LINUX__
|
||||
char strcurdir[256];
|
||||
getcwd(strcurdir, 256);
|
||||
s_strIniPath = strcurdir;
|
||||
s_strIniPath += "/inis/zerogs.ini";
|
||||
#endif
|
||||
|
||||
GSreset();
|
||||
GS_LOG("GSinit ok\n");
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue