aboutsummaryrefslogtreecommitdiff
path: root/src/qt/utilitydialog.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2020-05-04 11:53:21 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2020-05-04 11:53:34 +0200
commitafa577c323dcaedf641897fab43af2540e230bcb (patch)
tree79d4f3fad4166054ec21842c67330a0451abd63c /src/qt/utilitydialog.cpp
parent2e6a16b968a9d111da9a94e82b576460b563c7e3 (diff)
parentf5a3a5b9ab362c58fa424261f313aa9cf46d2a98 (diff)
Merge #15768: gui: Add close window shortcut
f5a3a5b9ab362c58fa424261f313aa9cf46d2a98 gui: Add close window shortcut (Miguel Herranz) Pull request description: CMD+W is the standard shortcut in macOS to close a window without exiting the program. This adds support to use the shortcut in both main and debug windows. ACKs for top commit: jonasschnelli: Tested ACK f5a3a5b9ab362c58fa424261f313aa9cf46d2a98 hebasto: ACK f5a3a5b9ab362c58fa424261f313aa9cf46d2a98, tested on Linux Mint 19.3 by manually opening available dialogs and sub-windows, and applying the `Ctrl+W` shortcut. Also tested with "Minimize on close" option enabled / disabled. Tree-SHA512: 39851f6680cf97c334d5759c6f8597cb45685359417493ff8b0566672edbd32303fa15ac4260ec8ab5ea1458a600a329153014f25609e1db9cf399aa851ae2f9
Diffstat (limited to 'src/qt/utilitydialog.cpp')
-rw-r--r--src/qt/utilitydialog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index d16feba1bb..01922cf996 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -10,6 +10,8 @@
#include <qt/forms/ui_helpmessagedialog.h>
+#include <qt/guiutil.h>
+
#include <clientversion.h>
#include <init.h>
#include <util/system.h>
@@ -102,6 +104,8 @@ HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bo
ui->scrollArea->setVisible(false);
ui->aboutLogo->setVisible(false);
}
+
+ GUIUtil::handleCloseWindowShortcut(this);
}
HelpMessageDialog::~HelpMessageDialog()
@@ -141,6 +145,8 @@ ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f):
tr("%1 is shutting down...").arg(PACKAGE_NAME) + "<br /><br />" +
tr("Do not shut down the computer until this window disappears.")));
setLayout(layout);
+
+ GUIUtil::handleCloseWindowShortcut(this);
}
QWidget* ShutdownWindow::showShutdownWindow(QMainWindow* window)