1
0

Unregister network callbacks from QT gui

Rework the callback system in QT to make this easy, and avoid
leaking window references that prevent the window from being
GC-ed on close
This commit is contained in:
Neil Booth
2015-11-13 22:42:21 +09:00
parent 0d4de870a5
commit ae4cfc9f0b
8 changed files with 60 additions and 39 deletions

View File

@@ -491,7 +491,7 @@ def make_new_contact():
do_refresh = False
def update_callback():
def update_callback(event):
global do_refresh
print "gui callback", network.is_connected()
do_refresh = True
@@ -908,7 +908,7 @@ class ElectrumGui:
global wallet, network, contacts, config
network = _network
config = _config
network.register_callback('updated', update_callback)
network.register_callback(update_callback, ['updated'])
contacts = util.StoreDict(config, 'contacts')