]> granicus.if.org Git - icinga2/commitdiff
Make sure the OK button is the default item for the Connect dialog
authorGunnar Beutner <gunnar@beutner.name>
Thu, 1 Oct 2015 04:07:40 +0000 (06:07 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 1 Oct 2015 04:07:40 +0000 (06:07 +0200)
refs #10042

icinga-studio/IcingaStudio.fbp
icinga-studio/connectform.cpp
icinga-studio/forms.cpp
icinga-studio/forms.h

index 33038d07a0264906c0b412054c990f412e3368c0..09adf7e3ed3bf499860cc366db1e028427587862 100644 (file)
                                     <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>
index 1a38ee1b39c10b2715c5795d742a041cc7274fcd..ab282ea69b5a252ea5f46266dc1e376cb63c90b9 100644 (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
index ec3b25ff3997e32273559056ef6c894babe5c700..b1e052f94e9ac0b81978437c8381293321c8432a 100644 (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 );
index 613b7d46976f1403682ea94a8e6c726ec6b39bb7..c125ecbbb45a7486395a5f026b1a8abd9cc073a9 100644 (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: