Set status icon color to yellow if last inbound connection is lost

This commit is contained in:
Dmitri Bogomolov 2019-06-07 14:54:00 +03:00
parent ff020c5192
commit c9bc97f4b2
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -207,6 +207,8 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
self.tableWidgetConnectionCount.item(0, 0).setData(QtCore.Qt.UserRole, destination) self.tableWidgetConnectionCount.item(0, 0).setData(QtCore.Qt.UserRole, destination)
self.tableWidgetConnectionCount.item(0, 1).setData(QtCore.Qt.UserRole, outbound) self.tableWidgetConnectionCount.item(0, 1).setData(QtCore.Qt.UserRole, outbound)
else: else:
if len(BMConnectionPool().inboundConnections) == 0:
self.window().setStatusIcon('yellow')
for i in range(self.tableWidgetConnectionCount.rowCount()): for i in range(self.tableWidgetConnectionCount.rowCount()):
if self.tableWidgetConnectionCount.item(i, 0).data(QtCore.Qt.UserRole).toPyObject() != destination: if self.tableWidgetConnectionCount.item(i, 0).data(QtCore.Qt.UserRole).toPyObject() != destination:
continue continue