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

@ -191,6 +191,11 @@ void InputConfigDialog::UpdateControlReferences()
(*i)->controller->UpdateReferences(g_controller_interface);
}
void InputConfigDialog::ClickCancel(wxCommandEvent&)
{
Close();
}
void InputConfigDialog::ClickSave(wxCommandEvent&)
{
m_plugin.SaveConfig();
@ -974,13 +979,15 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputPlugin& plugin
UpdateDeviceComboBox();
UpdateProfileComboBox();
wxButton* const close_button = new wxButton(this, -1, _("Save"));
_connect_macro_(close_button, InputConfigDialog::ClickSave, wxEVT_COMMAND_BUTTON_CLICKED, this);
wxButton* const close_button = new wxButton(this, wxID_OK, _("Save"));
_connect_macro_(close_button, InputConfigDialog::ClickSave, wxEVT_COMMAND_BUTTON_CLICKED, this);
wxButton* const cancel_button = new wxButton(this, wxID_CANCEL, _("Cancel"));
_connect_macro_(cancel_button, InputConfigDialog::ClickCancel, wxEVT_COMMAND_BUTTON_CLICKED, this);
wxBoxSizer* btns = new wxBoxSizer(wxHORIZONTAL);
//btns->Add(new wxStaticText(this, -1, wxString::FromAscii(ver.c_str())), 0, wxLEFT|wxTOP, 5);
btns->AddStretchSpacer();
btns->Add(cancel_button, 0, 0, 0);
btns->Add(close_button, 0, 0, 0);
wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL);