From 8c48e8c1f66ab379b1c7e9e114a21ca4d39df790 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 22 Feb 2020 18:58:39 -0600 Subject: Qt UI: Move Finish to F10 (see rationale:) When F8 is bound to both, pressing F8 on the penultimate page (currently the Accounts page) will send a clicked event to both Next and Finish. This means that the Commit (or Writeout) page will never be shown if the user is using keyboard-only input. --- ui/qt5/horizonwizard.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ui/qt5/horizonwizard.cc') diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc index 4b948be..6391937 100644 --- a/ui/qt5/horizonwizard.cc +++ b/ui/qt5/horizonwizard.cc @@ -266,9 +266,9 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) { setButtonText(BackButton, tr("< &Back (F6)")); setButtonText(NextButton, tr("Co&ntinue > (F8)")); #ifdef HAS_INSTALL_ENV - setButtonText(FinishButton, tr("&Install (F8)")); + setButtonText(FinishButton, tr("&Install (F10)")); #else - setButtonText(FinishButton, tr("&Save (F8)")); + setButtonText(FinishButton, tr("&Save (F10)")); #endif /* HAS_INSTALL_ENV */ f1 = new QShortcut(Qt::Key_F1, this); @@ -289,10 +289,13 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) { f8 = new QShortcut(Qt::Key_F8, this); connect(f8, &QShortcut::activated, button(NextButton), &QAbstractButton::click); - connect(f8, &QShortcut::activated, - button(FinishButton), &QAbstractButton::click); f8->setWhatsThis(tr("Goes forward to the next page.")); + f10 = new QShortcut(Qt::Key_F10, this); + connect(f10, &QShortcut::activated, + button(FinishButton), &QAbstractButton::click); + f10->setWhatsThis(tr("Finishes the wizard.")); + #ifdef HAS_INSTALL_ENV interfaces = probe_ifaces(); tain_now_set_stopwatch_g(); -- cgit v1.2.3-60-g2f50