From c9bc97f4b2f29d3a04743536cb6844ba2c355579 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 7 Jun 2019 14:54:00 +0300 Subject: [PATCH] Set status icon color to yellow if last inbound connection is lost --- src/bitmessageqt/networkstatus.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bitmessageqt/networkstatus.py b/src/bitmessageqt/networkstatus.py index 3d6e6618..5f014563 100644 --- a/src/bitmessageqt/networkstatus.py +++ b/src/bitmessageqt/networkstatus.py @@ -207,6 +207,8 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin): self.tableWidgetConnectionCount.item(0, 0).setData(QtCore.Qt.UserRole, destination) self.tableWidgetConnectionCount.item(0, 1).setData(QtCore.Qt.UserRole, outbound) else: + if len(BMConnectionPool().inboundConnections) == 0: + self.window().setStatusIcon('yellow') for i in range(self.tableWidgetConnectionCount.rowCount()): if self.tableWidgetConnectionCount.item(i, 0).data(QtCore.Qt.UserRole).toPyObject() != destination: continue