summaryrefslogtreecommitdiff
path: root/ui/qt5/horizonwizard.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-01 17:28:27 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-01 17:28:27 -0600
commit10eea3578306be8af2271a63204447c5bd70ebaf (patch)
tree1466f192054050c4f59b65f4b477e9983f3c4de4 /ui/qt5/horizonwizard.cc
parentbe8b59280569a00d0f32f3953e358e4b8c0c0e1a (diff)
downloadhorizon-10eea3578306be8af2271a63204447c5bd70ebaf.tar.gz
horizon-10eea3578306be8af2271a63204447c5bd70ebaf.tar.bz2
horizon-10eea3578306be8af2271a63204447c5bd70ebaf.tar.xz
horizon-10eea3578306be8af2271a63204447c5bd70ebaf.zip
Qt UI: Handle escape key, change label of Finish button
Diffstat (limited to 'ui/qt5/horizonwizard.cc')
-rw-r--r--ui/qt5/horizonwizard.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc
index cf2d5c9..19b4083 100644
--- a/ui/qt5/horizonwizard.cc
+++ b/ui/qt5/horizonwizard.cc
@@ -245,12 +245,20 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) {
setButtonText(CancelButton, tr("E&xit (F3)"));
setButtonText(BackButton, tr("< &Back (F6)"));
setButtonText(NextButton, tr("Co&ntinue > (F8)"));
+#ifdef HAS_INSTALL_ENV
+ setButtonText(FinishButton, tr("&Install (F8)"));
+#else
+ setButtonText(FinishButton, tr("&Save (F8)"));
+#endif /* HAS_INSTALL_ENV */
f1 = new QShortcut(Qt::Key_F1, this);
connect(f1, &QShortcut::activated,
button(HelpButton), &QAbstractButton::click);
f1->setWhatsThis(tr("Activates the Help screen."));
+ esc = new QShortcut(Qt::Key_Escape, this);
+ connect(esc, &QShortcut::activated,
+ button(CancelButton), &QAbstractButton::click);
f3 = new QShortcut(Qt::Key_F3, this);
connect(f3, &QShortcut::activated,
button(CancelButton), &QAbstractButton::click);
@@ -264,6 +272,8 @@ 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."));
#ifdef HAS_INSTALL_ENV