Dummy video dialog: make the OK button the default button of the dialog

Done by imitating the buttons in the timing postprocessor.

Originally committed to SVN as r6801.
This commit is contained in:
cantabile 2012-05-15 14:07:00 +00:00 committed by Thomas Goyne
parent 848ebf4d2d
commit 9254ea8ff6
1 changed files with 6 additions and 7 deletions

View File

@ -40,6 +40,8 @@
#include "dialog_dummy_video.h" #include "dialog_dummy_video.h"
#ifndef AGI_PRE #ifndef AGI_PRE
#include <tr1/functional>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/combobox.h> #include <wx/combobox.h>
#include <wx/datetime.h> #include <wx/datetime.h>
@ -196,13 +198,10 @@ DialogDummyVideo::DialogDummyVideo(wxWindow *parent)
wxBoxSizer *main_sizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *main_sizer = new wxBoxSizer(wxVERTICAL);
main_sizer->Add(fg, 1, wxALL|wxEXPAND, 5); main_sizer->Add(fg, 1, wxALL|wxEXPAND, 5);
ok_button = new wxButton(this,wxID_OK); wxStdDialogButtonSizer *btnSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
cancel_button = new wxButton(this,wxID_CANCEL); ok_button = btnSizer->GetAffirmativeButton();
wxStdDialogButtonSizer *btnSizer = new wxStdDialogButtonSizer(); btnSizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Dummy Video"));
btnSizer->AddButton(ok_button);
btnSizer->AddButton(cancel_button);
btnSizer->AddButton(new HelpButton(this,"Dummy Video"));
btnSizer->Realize();
main_sizer->Add(new wxStaticLine(this,wxHORIZONTAL),0,wxALL|wxEXPAND,5); main_sizer->Add(new wxStaticLine(this,wxHORIZONTAL),0,wxALL|wxEXPAND,5);
main_sizer->Add(btnSizer,0,wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND,5); main_sizer->Add(btnSizer,0,wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND,5);
// main_sizer->Add(CreateSeparatedButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5); // main_sizer->Add(CreateSeparatedButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5);