From af5f7c70d313a6066da773da770ce7d04cfb770e Mon Sep 17 00:00:00 2001 From: deeplow Date: Tue, 29 Nov 2022 13:42:58 +0000 Subject: [PATCH] Quit dangerzone on macOS when window is closed Closing windows on macOS would not actually close Dangerzone. Now that it is a single-window program, it makes sense for it to close immediately. Fixes #271 --- CHANGELOG.md | 1 + dangerzone/gui/main_window.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c3c5e5..f93758e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Bug fix: Do not hardcode "docker" in help messages, now that Podman is also used ([issue #122](https://github.com/freedomofpress/dangerzone/issues/122)) - Bug fix: Failed execution no longer produces an empty "safe" documents ([issue #214](https://github.com/freedomofpress/dangerzone/issues/214)) - Bug fix: Malfunctioning "New window" logic was replaced with multi-doc support (([issue #204](https://github.com/freedomofpress/dangerzone/issues/204))) +- Bug fix: (macOS) quit Dangerzone when main window is closed ([issue #271](https://github.com/freedomofpress/dangerzone/issues/271)) ## Dangerzone 0.3.2 diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index 3673cdf..9995f37 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -100,10 +100,7 @@ class MainWindow(QtWidgets.QMainWindow): else: e.accept() - if platform.system() != "Darwin": - # in MacOS applications only quit when the user - # explicitly closes them - self.dangerzone.app.quit() + self.dangerzone.app.quit() class InstallContainerThread(QtCore.QThread):