Merge pull request #85 from TWBlueQS/next-gen

Added the date indication to the new updates available dialog and updated readme
This commit is contained in:
2016-11-09 13:18:06 -06:00
committed by GitHub
5 changed files with 10 additions and 3 deletions

View File

@@ -28,10 +28,11 @@ def perform_update(endpoint, current_version, app_name='', password=None, update
logger.debug("No update for this architecture")
return False
available_description = available_update.get('description', None)
available_date = available_update.get('date', None)
update_url = available_update ['downloads'][platform.system()+platform.architecture()[0][:2]]
logger.info("A new update is available. Version %s" % available_version)
donation()
if callable(update_available_callback) and not update_available_callback(version=available_version, description=available_description): #update_available_callback should return a falsy value to stop the process
if callable(update_available_callback) and not update_available_callback(version=available_version, description=available_description, date=available_date): #update_available_callback should return a falsy value to stop the process
logger.info("User canceled update.")
return
base_path = tempfile.mkdtemp()

View File

@@ -5,8 +5,8 @@ import utils
progress_dialog = None
def available_update_dialog(version, description):
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)
def available_update_dialog(version, description, date):
dialog = wx.MessageDialog(None, _(u"There's a new %s version available, released on %s. Would you like to download it now?\n\n %s version: %s\n\nChanges:\n%s") % (application.name, date, application.name, version, description), _(u"New version for %s") % application.name, style=wx.YES|wx.NO|wx.ICON_WARNING)
if dialog.ShowModal() == wx.ID_YES:
return True
else: