auto update - settings, version checking

This commit is contained in:
ingvar1995 2016-09-30 23:48:30 +03:00
parent 8025c6a638
commit dfab0491a5
5 changed files with 114 additions and 6 deletions

View file

@ -259,6 +259,23 @@ class Toxygen:
self.tray.show()
self.tray.activated.connect(tray_activated)
if settings['update']: # auto update
version = updater.check_for_updates()
if version is not None:
if settings['update'] == 2:
updater.download(version)
else:
reply = QtGui.QMessageBox.question(None,
'',
QtGui.QApplication.translate("login",
'Update for Toxygen was found. Download and install it?',
None,
QtGui.QApplication.UnicodeUTF8),
QtGui.QMessageBox.Yes,
QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes:
updater.download(version)
self.ms.show()
plugin_helper = PluginLoader(self.tox, settings) # plugin support