Merge branch 'master' into feature/raw_tx

This commit is contained in:
Maran 2013-03-10 12:14:47 +01:00
commit 6075dd20c1
3 changed files with 11 additions and 9 deletions

View File

@ -124,9 +124,8 @@ if __name__ == '__main__':
interface = Interface(config, True)
wallet.interface = interface
interface.start()
if interface.is_connected:
interface.send([('server.peers.subscribe',[])])
interface.start(wait = False)
interface.send([('server.peers.subscribe',[])])
gui = gui.ElectrumGui(wallet, config)
@ -240,9 +239,8 @@ if __name__ == '__main__':
if not options.offline:
interface = Interface(config)
interface.start()
interface.start(wait=True)
wallet.interface = interface
verifier = WalletVerifier(interface, config)
wallet.set_verifier(verifier)

View File

@ -586,10 +586,14 @@ class Interface(threading.Thread):
return out
def start(self):
def start(self, wait=True):
threading.Thread.start(self)
# wait until connection is established
self.connect_event.wait()
if wait:
# wait until connection is established
self.connect_event.wait()
if not self.is_connected:
print_msg("Not connected, aborting.")
sys.exit(1)
def run(self):
while True:

View File

@ -34,7 +34,6 @@ class QR_Window(QWidget):
self.amount = 0
self.setFocusPolicy(QtCore.Qt.NoFocus)
self.merchant_name = config.get('merchant_name', 'Invoice')
main_box = QHBoxLayout()
self.qrw = QRCodeWidget()
@ -100,6 +99,7 @@ def get_info():
def init(gui):
gui.requested_amounts = gui.config.get('requested_amounts',{})
gui.merchant_name = gui.config.get('merchant_name', 'Invoice')
gui.qr_window = None