From 167da731d0de3b715fdffca606ec3917a5def8e2 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Wed, 20 Apr 2016 15:24:49 +0200 Subject: [PATCH] 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. --- src/bitmessageqt/__init__.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 70a39a31..a36629be 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1817,28 +1817,8 @@ class MyForm(settingsmixin.SMainWindow): break def newVersionAvailable(self, version): -# if (not (self.windowState() & QtCore.Qt.WindowActive)) or (self.windowState() & QtCore.Qt.WindowMinimized): -# return - # only notify once until next restart - try: - if self.notifiedNewVersion: - return - except AttributeError: - pass - self.notifiedNewVersion = ".".join(str(n) for n in version) - message = "New " - if version[1] % 2: - message += "UNSTABLE" - else: - message += "stable" - message += " version of PyBitmessage is available: " + self.notifiedNewVersion + ". Download it from https://github.com/" - if version[0] == 0 and version[1] == 5: - message += "mailchuck" - else: - 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 https://github.com/Bitmessage/PyBitmessage/releases/latest").arg(self.notifiedNewVersion)) def displayAlert(self, title, text, exitAfterUserClicksOk): self.statusBar().showMessage(text)