finish proper window handling, fix the modal state of the config dialogs, plus some minor cleanup/changes :p

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5129 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
luisr142004
2010-02-25 06:12:35 +00:00
parent 4915097d93
commit 816febd3b0
33 changed files with 422 additions and 454 deletions

View File

@ -317,7 +317,7 @@ void *CPluginManager::LoadPlugin(const char *_rFilename)
return NULL;
}
// Check that the plugin has both all the common and all the type specific functions
// Check that the plugin has all the common and all the type specific functions
if (!plugin->IsValid())
{
PanicAlert("Can't open %s, it has a missing function", _rFilename);

View File

@ -23,7 +23,7 @@
BEGIN_EVENT_TABLE(AboutDolphin, wxDialog)
EVT_CLOSE(AboutDolphin::OnClose)
EVT_BUTTON(ID_CLOSE, AboutDolphin::CloseClick)
EVT_BUTTON(wxID_CLOSE, AboutDolphin::CloseClick)
END_EVENT_TABLE()
AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
@ -38,7 +38,7 @@ AboutDolphin::~AboutDolphin()
void AboutDolphin::CreateGUIControls()
{
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
//miloszwl@miloszwl.com (miloszwl.deviantart.com)
wxMemoryInputStream istream(dolphin_logo_png, sizeof dolphin_logo_png);
@ -79,8 +79,8 @@ void AboutDolphin::CreateGUIControls()
this->SetSizer(sMain);
sMain->Layout();
CenterOnParent();
Fit();
CenterOnParent();
}
void AboutDolphin::OnClose(wxCloseEvent& WXUNUSED (event))

View File

@ -29,7 +29,7 @@ class AboutDolphin : public wxDialog
{
public:
AboutDolphin(wxWindow *parent,
wxWindowID id = 1,
wxWindowID id = wxID_ANY,
const wxString &title = wxT("About Dolphin"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@ -52,8 +52,7 @@ class AboutDolphin : public wxDialog
enum
{
ID_CLOSE = 1000,
ID_LOGO,
ID_LOGO = 1000,
ID_MESSAGE
};

View File

@ -327,7 +327,7 @@ CFrame::CFrame(wxFrame* parent,
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
, m_LogWindow(NULL)
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
, m_bModalDialogOpen(false), m_bControlsCreated(false), m_StopDlg(NULL)
, m_bControlsCreated(false), m_StopDlg(NULL)
#if wxUSE_TIMER
#ifdef _WIN32
, m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0)
@ -610,10 +610,15 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
break;
default:
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
}
break;
default:
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
}
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
return 0;
}
#endif
@ -928,13 +933,13 @@ void X11_ShowFullScreen(bool bF)
void CFrame::DoFullscreen(bool bF)
{
#if defined HAVE_X11 && HAVE_X11
if ((Core::GetState() == Core::CORE_RUN) && !m_bModalDialogOpen)
if ((Core::GetState() == Core::CORE_RUN))
X11_ShowFullScreen(bF);
#endif
// Only switch this to fullscreen if we're rendering to main AND if we're running a game
// plus if a modal dialog is open, this will still process the keyboard events, and may cause
// the main window to become unresponsive, so we have to avoid that.
if ((bRenderToMain && Core::GetState() == Core::CORE_RUN) && !m_bModalDialogOpen)
if ((bRenderToMain && Core::GetState() == Core::CORE_RUN))
{
ShowFullScreen(bF);
@ -1055,4 +1060,4 @@ void CFrame::ListTopWindows()
j++;
}
NOTICE_LOG(CONSOLE, "\n");
}
}

View File

@ -199,7 +199,6 @@ class CFrame : public wxFrame
bool m_bEdit;
bool m_bTabSplit;
bool m_bNoDocking;
bool m_bModalDialogOpen;
bool m_bControlsCreated;
char newDiscpath[2048];
wxMessageDialog *m_StopDlg;

View File

@ -282,6 +282,7 @@ void CMemcardManager::CreateGUIControls()
this->SetSizer(sMain);
sMain->SetSizeHints(this);
Fit();
Center();
for (int i = SLOT_A; i < SLOT_B + 1; i++)
{

View File

@ -47,12 +47,11 @@
#endif
class CMemcardManager
: public wxDialog
class CMemcardManager : public wxDialog
{
public:
CMemcardManager(wxWindow *parent, wxWindowID id = 1, const wxString& title = wxT(MEMCARDMAN_TITLE),
CMemcardManager(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = wxT(MEMCARDMAN_TITLE),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MEMCARD_MANAGER_STYLE);
virtual ~CMemcardManager();