Browse Source

Merge #481: Qt: Only show wallet sync in status bar at start

ce49ea3 Qt: Only show wallet sync in status bar at start (Adam Gibson)
master
Adam Gibson 6 years ago
parent
commit
e77ceb3f2c
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 12
      scripts/joinmarket-qt.py

12
scripts/joinmarket-qt.py

@ -1292,6 +1292,10 @@ class JMMainWindow(QMainWindow):
# the walletservice to update the GUI # the walletservice to update the GUI
self.walletRefresh = None self.walletRefresh = None
# keep track of whether wallet sync message
# was already shown
self.syncmsg = ""
self.reactor = reactor self.reactor = reactor
self.initUI() self.initUI()
@ -1631,13 +1635,15 @@ class JMMainWindow(QMainWindow):
def updateWalletInfo(self): def updateWalletInfo(self):
t = self.centralWidget().widget(0) t = self.centralWidget().widget(0)
if not self.wallet_service: #failure to sync in constructor means object is not created if not self.wallet_service: #failure to sync in constructor means object is not created
newstmsg = "Unable to sync wallet - see error in console." newsyncmsg = "Unable to sync wallet - see error in console."
elif not self.wallet_service.synced: elif not self.wallet_service.synced:
return return
else: else:
t.updateWalletInfo(get_wallet_printout(self.wallet_service)) t.updateWalletInfo(get_wallet_printout(self.wallet_service))
newstmsg = "Wallet synced successfully." newsyncmsg = "Wallet synced successfully."
self.statusBar().showMessage(newstmsg) if newsyncmsg != self.syncmsg:
self.syncmsg = newsyncmsg
self.statusBar().showMessage(self.syncmsg)
def generateWallet(self): def generateWallet(self):
log.debug('generating wallet') log.debug('generating wallet')

Loading…
Cancel
Save