dialog=wx.MessageDialog(None,_(u"There's a new %s version available. Would you like to download it now?\n\n%s version: %s\n\nChanges:\n%s")%(application.name,application.name,version,description),_(u"New version for %s")%application.name,style=wx.YES|wx.NO|wx.ICON_WARNING)
ifdialog.ShowModal()==wx.ID_YES:
returnTrue
else:
returnFalse
defcreate_progress_dialog():
returnwx.ProgressDialog(_(u"Download in Progress"),_(u"Downloading the new version..."),parent=None,maximum=100)
progress_dialog.Update((total_downloaded*100)/total_size,_(u"Updating... %s of %s")%(str(utils.convert_bytes(total_downloaded)),str(utils.convert_bytes(total_size))))
defupdate_finished():
ms=wx.MessageDialog(None,_(u"The update has been downloaded and installed successfully. Press OK to continue."),_(u"Done!")).ShowModal()