Make sure the OK button is the default item for the Connect dialog

refs #10042
This commit is contained in:
Gunnar Beutner 2015-10-01 06:07:40 +02:00
parent e5cd1f92de
commit ee95e10128
4 changed files with 6 additions and 4 deletions

View File

@ -1575,7 +1575,7 @@
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_Buttons</property>
<property name="permission">none</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick"></event>
<event name="OnContextHelpButtonClick"></event>

View File

@ -52,6 +52,8 @@ ConnectForm::ConnectForm(wxWindow *parent, const Url::Ptr& url)
m_PortText->SetValue(hostport[1]);
else
m_PortText->SetValue("5665");
SetDefaultItem(m_ButtonsOK);
}
Url::Ptr ConnectForm::GetUrl(void) const

View File

@ -142,9 +142,6 @@ ConnectFormBase::ConnectFormBase( wxWindow* parent, wxWindowID id, const wxStrin
wxBoxSizer* m_ButtonsSizer;
m_ButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
wxStdDialogButtonSizer* m_Buttons;
wxButton* m_ButtonsOK;
wxButton* m_ButtonsCancel;
m_Buttons = new wxStdDialogButtonSizer();
m_ButtonsOK = new wxButton( m_ButtonsPanel, wxID_OK );
m_Buttons->AddButton( m_ButtonsOK );

View File

@ -77,6 +77,9 @@ class ConnectFormBase : public wxDialog
wxTextCtrl* m_PortText;
wxTextCtrl* m_UserText;
wxTextCtrl* m_PasswordText;
wxStdDialogButtonSizer* m_Buttons;
wxButton* m_ButtonsOK;
wxButton* m_ButtonsCancel;
public: