Skip to content

Commit

Permalink
updateCheck, installerGui: Hide the progress dialog before destroying…
Browse files Browse the repository at this point in the history
… it. For updateCheck, make sure the Python object gets deleted as well.

This seems to fix the crash after updating and the issue where the progress dialog would still show while the message box was being displayed. I'm not sure why this is necessary, but it seems Destroy is delayed somehow.
  • Loading branch information
jcsteh committed Apr 16, 2012
1 parent d737f22 commit cf2ae90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/gui/installerGui.py
Expand Up @@ -124,6 +124,7 @@ def done(self):
self.timer.Stop()
if self.IsActive():
tones.beep(1760, 40)
self.Hide()
self.Destroy()

class PortableCreaterDialog(wx.Dialog):
Expand Down
4 changes: 4 additions & 0 deletions source/updateCheck.py
Expand Up @@ -277,15 +277,19 @@ def _downloadReport(self, read, size):
self._progressDialog.Update(percent, _("Downloading"))

def _error(self):
self._progressDialog.Hide()
self._progressDialog.Destroy()
self._progressDialog = None
gui.messageBox(
# Translators: A message indicating that an error occurred while downloading an update to NVDA.
_("Error downloading update."),
_("Error"),
wx.OK | wx.ICON_ERROR)

def _downloadSuccess(self):
self._progressDialog.Hide()
self._progressDialog.Destroy()
self._progressDialog = None
# Translators: The message presented when the update has been successfully downloaded
# and is about to be installed.
gui.messageBox(_("Update downloaded. It will now be installed."),
Expand Down

0 comments on commit cf2ae90

Please sign in to comment.