From 79e199b45a4a688fdf5350108db561ae3f1bcdd0 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Thu, 12 Nov 2015 00:54:22 +0100 Subject: [PATCH] Show sync status in Network tab Addresses Bitmessage#745 (but no API exposure yet) --- src/bitmessageqt/__init__.py | 3 +++ src/bitmessageqt/bitmessageui.py | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 3d68f37d..37892aa6 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1605,14 +1605,17 @@ class MyForm(settingsmixin.SMainWindow): self.appIndicatorShowOrHideWindow() def updateNumberOfMessagesProcessed(self): + self.ui.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer)))) self.ui.labelMessageCount.setText(_translate( "MainWindow", "Processed %1 person-to-person messages.").arg(str(shared.numberOfMessagesProcessed))) def updateNumberOfBroadcastsProcessed(self): + self.ui.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer)))) self.ui.labelBroadcastCount.setText(_translate( "MainWindow", "Processed %1 broadcast messages.").arg(str(shared.numberOfBroadcastsProcessed))) def updateNumberOfPubkeysProcessed(self): + self.ui.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer)))) self.ui.labelPubkeyCount.setText(_translate( "MainWindow", "Processed %1 public keys.").arg(str(shared.numberOfPubkeysProcessed))) diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index 230104b3..e303567f 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -639,14 +639,17 @@ class Ui_MainWindow(object): self.labelBroadcastCount = QtGui.QLabel(self.networkstatus) self.labelBroadcastCount.setGeometry(QtCore.QRect(350, 150, 351, 16)) 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.setGeometry(QtCore.QRect(320, 250, 291, 16)) + self.labelLookupsPerSecond.setGeometry(QtCore.QRect(320, 270, 291, 16)) self.labelLookupsPerSecond.setObjectName(_fromUtf8("labelLookupsPerSecond")) 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.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")) icon11 = QtGui.QIcon() 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)) self.labelTotalConnections.setText(_translate("MainWindow", "Total connections:", 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.labelPubkeyCount.setText(_translate("MainWindow", "Processed 0 public keys.", None)) self.labelBroadcastCount.setText(_translate("MainWindow", "Processed 0 broadcasts.", None))