summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-05-29 22:47:48 +0200
committerCarl Hetherington <cth@carlh.net>2023-05-29 22:47:48 +0200
commit4493f23618adee7901c297ed6402611205a1cce4 (patch)
tree329894b6719c7e12848e8add22d6f471f7656ff7
parent86b88c37c34de9cd0c51e0825d28b6258e2451d2 (diff)
Focus the "make DCP/OK" button in the hints dialog (#2539).
-rw-r--r--src/wx/hints_dialog.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc
index 7a44e2267..72a57740e 100644
--- a/src/wx/hints_dialog.cc
+++ b/src/wx/hints_dialog.cc
@@ -69,15 +69,20 @@ HintsDialog::HintsDialog (wxWindow* parent, std::weak_ptr<Film> film, bool ok)
auto buttons = CreateStdDialogButtonSizer (0);
sizer->Add (CreateSeparatedSizer(buttons), wxSizerFlags().Expand().DoubleBorder());
+ wxButton* default_button = nullptr;
if (ok) {
- buttons->SetAffirmativeButton (new wxButton (this, wxID_OK));
+ default_button = new wxButton(this, wxID_OK);
+ buttons->SetAffirmativeButton(default_button);
} else {
- buttons->SetAffirmativeButton (new wxButton (this, wxID_OK, _("Make DCP")));
+ default_button = new wxButton(this, wxID_OK, _("Make DCP"));
+ buttons->SetAffirmativeButton(default_button);
buttons->SetNegativeButton (new wxButton (this, wxID_CANCEL, _("Go back")));
}
buttons->Realize ();
+ default_button->SetFocus();
+
SetSizer (sizer);
sizer->Layout ();
sizer->SetSizeHints (this);