Skip to content

Commit

Permalink
Merge pull request #1011 from freedomofpress/fix-992
Browse files Browse the repository at this point in the history
disable the cancel button right before we export the file
  • Loading branch information
redshiftzero authored Mar 26, 2020
2 parents a63eefa + 652b245 commit 5392db8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2946,6 +2946,7 @@ def _run_preflight(self):
@pyqtSlot()
def _export_file(self, checked: bool = False):
self.start_animate_activestate()
self.cancel_button.setEnabled(False)
self.passphrase_field.setDisabled(True)
self.controller.export_file_to_usb_drive(self.file_uuid, self.passphrase_field.text())

Expand Down Expand Up @@ -2978,6 +2979,7 @@ def _on_export_success(self):
@pyqtSlot(object)
def _on_export_failure(self, error: ExportError):
self.stop_animate_activestate()
self.cancel_button.setEnabled(True)
self.passphrase_field.setDisabled(False)
self._update_dialog(error.status)

Expand Down

0 comments on commit 5392db8

Please sign in to comment.