Make new version notifications less intrusive

Now only in status bar and no more popup window.

Previously, it only showed once until a restart, but now it shows every
time it detects a new version online. Since it does not show a popup
window it's not a big deal.
This commit is contained in:
mailchuck 2016-04-20 15:24:49 +02:00 committed by Peter Surda
parent 2f27d43e7e
commit 167da731d0
1 changed files with 1 additions and 21 deletions

View File

@ -1817,28 +1817,8 @@ class MyForm(settingsmixin.SMainWindow):
def newVersionAvailable(self, version):
# if (not (self.windowState() & QtCore.Qt.WindowActive)) or (self.windowState() & QtCore.Qt.WindowMinimized):
# return
# only notify once until next restart
if self.notifiedNewVersion:
except AttributeError:
self.notifiedNewVersion = ".".join(str(n) for n in version)
message = "New "
if version[1] % 2:
message += "UNSTABLE"
message += "stable"
message += " version of PyBitmessage is available: " + self.notifiedNewVersion + ". Download it from"
if version[0] == 0 and version[1] == 5:
message += "mailchuck"
message += "Bitmessage"
message += "/PyBitmessage/releases/latest"
self.displayAlert("New release of PyBitmessage available", message, False)
self.statusBar().showMessage(_translate("MainWindow", "New version of PyBitmessage is available: %1. Download it from").arg(self.notifiedNewVersion))
def displayAlert(self, title, text, exitAfterUserClicksOk):