The escape key should now work to close most of the dialogs in dolphin. Let me know of any that I missed. I am sure there are some. I also notice that anytime a wxNotebook is used a page should be set to get proper focus on the dialog.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7351 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-03-15 14:37:04 +00:00
parent 1e46f069c2
commit f26a7288a7
7 changed files with 30 additions and 17 deletions

View File

@ -461,7 +461,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
page_advanced->SetSizerAndFit(szr_advanced);
}
wxButton* const btn_close = new wxButton(this, -1, _("Close"), wxDefaultPosition);
wxButton* const btn_close = new wxButton(this, wxID_OK, _("Close"), wxDefaultPosition);
_connect_macro_(btn_close, VideoConfigDiag::Event_ClickClose, wxEVT_COMMAND_BUTTON_CLICKED, this);
Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler(VideoConfigDiag::Event_Close), (wxObject*)0, this);
@ -470,6 +470,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
szr_main->Add(notebook, 1, wxEXPAND | wxALL, 5);
szr_main->Add(btn_close, 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 5);
notebook->SetSelection(0);
SetSizerAndFit(szr_main);
Center();