From e75c7c3baa1306a6c8b5adf822c20bc2e27b29ea Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Thu, 9 Apr 2020 13:06:37 -0700 Subject: [PATCH] Tweak code ordering, comment --- launcher/sdw_updater_gui/UpdaterApp.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/launcher/sdw_updater_gui/UpdaterApp.py b/launcher/sdw_updater_gui/UpdaterApp.py index 04800c2e..4b10892e 100644 --- a/launcher/sdw_updater_gui/UpdaterApp.py +++ b/launcher/sdw_updater_gui/UpdaterApp.py @@ -31,14 +31,18 @@ def __init__(self, parent=None): self.progress = 0 self.setupUi(self) - self.cancelButton.setEnabled(True) - self.cancelButton.show() - self.cancelButton.clicked.connect(self.exit_launcher) + # We use a single dialog with button visibility toggled at different + # stages. In the first stage, we only show the "Start Updates" and + # "Cancel" buttons. self.applyUpdatesButton.setEnabled(True) self.applyUpdatesButton.show() self.applyUpdatesButton.clicked.connect(self.apply_all_updates) + self.cancelButton.setEnabled(True) + self.cancelButton.show() + self.cancelButton.clicked.connect(self.exit_launcher) + self.clientOpenButton.setEnabled(False) self.clientOpenButton.hide() self.clientOpenButton.clicked.connect(launch_securedrop_client)