From f025b5703a9c1dba4c7ab8e8ea10499a14ca03d5 Mon Sep 17 00:00:00 2001 From: James Teh Date: Fri, 12 Aug 2011 02:25:07 +1000 Subject: [PATCH] installer GUI: Add a progress dialog which will appear during installation. We can't determine the progress of the install, so the progress is indeterminate for now. --- source/gui/installer.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/gui/installer.py b/source/gui/installer.py index 12c0b6822..679c8f3c3 100644 --- a/source/gui/installer.py +++ b/source/gui/installer.py @@ -67,7 +67,25 @@ class InstallerDialog(wx.Dialog): self.programFolderEdit.Value = d.Path def onInstall(self, evt): + self.Hide() + self.progressDialog = IndeterminateProgressDialog(self, _("Installing NVDA"), _("Please wait while NVDA is being installed.")) + self.progressDialog.Raise() + wx.CallLater(5000, self.installDone) + + def installDone(self): + self.progressDialog.done() self.Destroy() def onCancel(self, evt): self.Destroy() + +class IndeterminateProgressDialog(wx.ProgressDialog): + + def __init__(self, parent, title, message): + super(IndeterminateProgressDialog, self).__init__(title, message, parent=parent) + self.timer = wx.PyTimer(self.Pulse) + self.timer.Start(1000) + + def done(self): + self.timer.Stop() + self.Destroy() -- 2.11.0