Skip to content

Commit

Permalink
Merge pull request #2457 from degasus/master
Browse files Browse the repository at this point in the history
DolphinWX: Drop dead hotkey button.
  • Loading branch information
skidau committed May 26, 2015
2 parents 0b61a0d + b64301d commit 8944e07
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
35 changes: 0 additions & 35 deletions Source/Core/DolphinWX/Config/InterfaceConfigPane.cpp
Expand Up @@ -101,7 +101,6 @@ void InterfaceConfigPane::InitializeGUI()
m_osd_messages_checkbox = new wxCheckBox(this, wxID_ANY, _("On-Screen Display Messages"));
m_pause_focus_lost_checkbox = new wxCheckBox(this, wxID_ANY, _("Pause on Focus Lost"));
m_interface_lang_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_interface_lang_strings);
m_hotkey_config_button = new wxButton(this, wxID_ANY, _("Hotkeys"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
m_theme_choice = new wxChoice(this, wxID_ANY);

m_confirm_stop_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnConfirmStopCheckBoxChanged, this);
Expand All @@ -120,8 +119,6 @@ void InterfaceConfigPane::InitializeGUI()
wxBoxSizer* const language_sizer = new wxBoxSizer(wxHORIZONTAL);
language_sizer->Add(new wxStaticText(this, wxID_ANY, _("Language:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
language_sizer->Add(m_interface_lang_choice, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
language_sizer->AddStretchSpacer();
language_sizer->Add(m_hotkey_config_button, 0, wxALIGN_RIGHT | wxALL, 5);

wxBoxSizer* const theme_sizer = new wxBoxSizer(wxHORIZONTAL);
theme_sizer->Add(new wxStaticText(this, wxID_ANY, _("Theme:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
Expand Down Expand Up @@ -185,38 +182,6 @@ void InterfaceConfigPane::LoadThemes()
m_theme_choice->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
}

void InterfaceConfigPane::OnHotkeyConfigButtonClicked(wxCommandEvent& event)
{
bool was_init = false;

InputConfig* const hotkey_plugin = HotkeyManagerEmu::GetConfig();

// check if game is running
if (g_controller_interface.IsInit())
{
was_init = true;
}
else
{
#if defined(HAVE_X11) && HAVE_X11
Window win = X11Utils::XWindowFromHandle(GetHandle());
HotkeyManagerEmu::Initialize(reinterpret_cast<void*>(win));
#else
HotkeyManagerEmu::Initialize(reinterpret_cast<void*>(GetHandle()));
#endif
}

InputConfigDialog m_ConfigFrame(this, *hotkey_plugin, _("Dolphin Hotkeys"));
m_ConfigFrame.ShowModal();

// if game isn't running
if (!was_init)
HotkeyManagerEmu::Shutdown();

// Update the GUI in case menu accelerators were changed
main_frame->UpdateGUI();
}

void InterfaceConfigPane::OnConfirmStopCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop = m_confirm_stop_checkbox->IsChecked();
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/DolphinWX/Config/InterfaceConfigPane.h
Expand Up @@ -21,7 +21,6 @@ class InterfaceConfigPane final : public wxPanel
void LoadGUIValues();
void LoadThemes();

void OnHotkeyConfigButtonClicked(wxCommandEvent&);
void OnConfirmStopCheckBoxChanged(wxCommandEvent&);
void OnPanicHandlersCheckBoxChanged(wxCommandEvent&);
void OnOSDMessagesCheckBoxChanged(wxCommandEvent&);
Expand All @@ -31,7 +30,6 @@ class InterfaceConfigPane final : public wxPanel

wxArrayString m_interface_lang_strings;

wxButton* m_hotkey_config_button;
wxCheckBox* m_confirm_stop_checkbox;
wxCheckBox* m_panic_handlers_checkbox;
wxCheckBox* m_osd_messages_checkbox;
Expand Down

0 comments on commit 8944e07

Please sign in to comment.