1
0

pass network to NetworkDialog and Blockchain

This commit is contained in:
thomasv
2013-09-10 18:27:32 +02:00
parent 2df129cfbf
commit 73901a001a
5 changed files with 20 additions and 13 deletions

View File

@@ -31,20 +31,21 @@ protocol_names = ['TCP', 'HTTP', 'SSL', 'HTTPS']
protocol_letters = 'thsg'
class NetworkDialog(QDialog):
def __init__(self, interface, config, parent):
def __init__(self, network, config, parent):
QDialog.__init__(self,parent)
self.setModal(1)
self.setWindowTitle(_('Server'))
self.setMinimumSize(375, 20)
self.interface = interface
self.network = network
self.interface = interface = network.interface
self.config = config
self.protocol = None
if parent:
if interface.is_connected:
status = _("Connected to")+" %s"%(interface.host) + "\n%d "%(parent.wallet.verifier.blockchain.height)+_("blocks")
status = _("Connected to")+" %s"%(interface.host) + "\n%d "%(network.blockchain.height)+_("blocks")
else:
status = _("Not connected")
server = interface.server
@@ -55,6 +56,7 @@ class NetworkDialog(QDialog):
self.servers = interface.get_servers()
vbox = QVBoxLayout()
vbox.setSpacing(30)