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

@@ -53,7 +53,7 @@ class ElectrumGui:
self.history = None
if self.network:
self.network.register_callback('updated', self.update)
self.network.register_callback(self.update, ['updated'])
self.tab_names = [_("History"), _("Send"), _("Receive"), _("Addresses"), _("Contacts"), _("Banner")]
self.num_tabs = len(self.tab_names)
@@ -80,7 +80,7 @@ class ElectrumGui:
self.set_cursor(0)
return s
def update(self):
def update(self, event):
self.update_history()
if self.tab == 0:
self.print_history()