Show sync status in Network tab

Addresses Bitmessage#745 (but no API exposure yet)
This commit is contained in:
mailchuck 2015-11-12 00:54:22 +01:00
parent 6fef090261
commit 53062f61b9
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
2 changed files with 10 additions and 3 deletions

View File

@ -1605,14 +1605,17 @@ class MyForm(settingsmixin.SMainWindow):
self.appIndicatorShowOrHideWindow() self.appIndicatorShowOrHideWindow()
def updateNumberOfMessagesProcessed(self): def updateNumberOfMessagesProcessed(self):
self.ui.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer))))
self.ui.labelMessageCount.setText(_translate( self.ui.labelMessageCount.setText(_translate(
"MainWindow", "Processed %1 person-to-person messages.").arg(str(shared.numberOfMessagesProcessed))) "MainWindow", "Processed %1 person-to-person messages.").arg(str(shared.numberOfMessagesProcessed)))
def updateNumberOfBroadcastsProcessed(self): def updateNumberOfBroadcastsProcessed(self):
self.ui.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer))))
self.ui.labelBroadcastCount.setText(_translate( self.ui.labelBroadcastCount.setText(_translate(
"MainWindow", "Processed %1 broadcast messages.").arg(str(shared.numberOfBroadcastsProcessed))) "MainWindow", "Processed %1 broadcast messages.").arg(str(shared.numberOfBroadcastsProcessed)))
def updateNumberOfPubkeysProcessed(self): def updateNumberOfPubkeysProcessed(self):
self.ui.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer))))
self.ui.labelPubkeyCount.setText(_translate( self.ui.labelPubkeyCount.setText(_translate(
"MainWindow", "Processed %1 public keys.").arg(str(shared.numberOfPubkeysProcessed))) "MainWindow", "Processed %1 public keys.").arg(str(shared.numberOfPubkeysProcessed)))

View File

@ -639,14 +639,17 @@ class Ui_MainWindow(object):
self.labelBroadcastCount = QtGui.QLabel(self.networkstatus) self.labelBroadcastCount = QtGui.QLabel(self.networkstatus)
self.labelBroadcastCount.setGeometry(QtCore.QRect(350, 150, 351, 16)) self.labelBroadcastCount.setGeometry(QtCore.QRect(350, 150, 351, 16))
self.labelBroadcastCount.setObjectName(_fromUtf8("labelBroadcastCount")) self.labelBroadcastCount.setObjectName(_fromUtf8("labelBroadcastCount"))
self.labelSyncStatus = QtGui.QLabel(self.networkstatus)
self.labelSyncStatus.setGeometry(QtCore.QRect(350, 190, 331, 20))
self.labelSyncStatus.setObjectName(_fromUtf8("labelSyncStatus"))
self.labelLookupsPerSecond = QtGui.QLabel(self.networkstatus) self.labelLookupsPerSecond = QtGui.QLabel(self.networkstatus)
self.labelLookupsPerSecond.setGeometry(QtCore.QRect(320, 250, 291, 16)) self.labelLookupsPerSecond.setGeometry(QtCore.QRect(320, 270, 291, 16))
self.labelLookupsPerSecond.setObjectName(_fromUtf8("labelLookupsPerSecond")) self.labelLookupsPerSecond.setObjectName(_fromUtf8("labelLookupsPerSecond"))
self.labelBytesRecvCount = QtGui.QLabel(self.networkstatus) self.labelBytesRecvCount = QtGui.QLabel(self.networkstatus)
self.labelBytesRecvCount.setGeometry(QtCore.QRect(350, 210, 251, 16)) self.labelBytesRecvCount.setGeometry(QtCore.QRect(350, 230, 251, 16))
self.labelBytesRecvCount.setObjectName(_fromUtf8("labelBytesRecvCount")) self.labelBytesRecvCount.setObjectName(_fromUtf8("labelBytesRecvCount"))
self.labelBytesSentCount = QtGui.QLabel(self.networkstatus) self.labelBytesSentCount = QtGui.QLabel(self.networkstatus)
self.labelBytesSentCount.setGeometry(QtCore.QRect(350, 230, 251, 16)) self.labelBytesSentCount.setGeometry(QtCore.QRect(350, 250, 251, 16))
self.labelBytesSentCount.setObjectName(_fromUtf8("labelBytesSentCount")) self.labelBytesSentCount.setObjectName(_fromUtf8("labelBytesSentCount"))
icon11 = QtGui.QIcon() icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/networkstatus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon11.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/networkstatus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
@ -830,6 +833,7 @@ class Ui_MainWindow(object):
item.setText(_translate("MainWindow", "Connections", None)) item.setText(_translate("MainWindow", "Connections", None))
self.labelTotalConnections.setText(_translate("MainWindow", "Total connections:", None)) self.labelTotalConnections.setText(_translate("MainWindow", "Total connections:", None))
self.labelStartupTime.setText(_translate("MainWindow", "Since startup:", None)) self.labelStartupTime.setText(_translate("MainWindow", "Since startup:", None))
self.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced:", None))
self.labelMessageCount.setText(_translate("MainWindow", "Processed 0 person-to-person messages.", None)) self.labelMessageCount.setText(_translate("MainWindow", "Processed 0 person-to-person messages.", None))
self.labelPubkeyCount.setText(_translate("MainWindow", "Processed 0 public keys.", None)) self.labelPubkeyCount.setText(_translate("MainWindow", "Processed 0 public keys.", None))
self.labelBroadcastCount.setText(_translate("MainWindow", "Processed 0 broadcasts.", None)) self.labelBroadcastCount.setText(_translate("MainWindow", "Processed 0 broadcasts.", None))