Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions tinywallet/tinywallet/screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,21 @@ def showLive(self, show):
self.submitBttn.setVisible(not show)
self.useTmpBttn.setVisible(show)

def setDcrdLabelOn(self):
"""
Prints message when dcrd connection is on
"""

self.connectedLbl.setText("Connected to dcrd")

def setDcrdLabelOff(self):
"""
Prints message when dcrd connection is off
"""

self.connectedLbl.setText("Connection to dcrd is currently off")


def readConfig(self):
"""
Shows the configuration form if dcrd is not configured, else the
Expand All @@ -1623,9 +1638,9 @@ def readConfig(self):
self.connectedWgt.setVisible(True)
self.hostLbl.setText(ctl.settings[DB.rpchost].decode())
if node and node.connected():
self.connectedLbl.setText("Connected to dcrd")
self.setDcrdLabelOn()
else:
self.connectedLbl.setText("Connection to dcrd is currently off")
self.setDcrdLabelOff()
else:
self.remoteForm.setVisible(True)
self.connectedWgt.setVisible(False)
Expand All @@ -1649,9 +1664,12 @@ def withDCRD(node):

self.ctl.connectNode(withDCRD)

self.setDcrdLabelOn()

else:
node.close()
self.ctl.setNode(None)
self.setDcrdLabelOff()

def fieldEdited(self, s):
"""
Expand Down