From afb50132725449825ad5cb9c572e14a962b3ec04 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 12 Nov 2015 15:32:24 +0900 Subject: [PATCH] Remove non-existent callbacks and handlers --- gui/android.py | 3 --- gui/stdio.py | 13 +------------ gui/text.py | 3 --- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/gui/android.py b/gui/android.py index c1d9f472e..16d14d8a1 100644 --- a/gui/android.py +++ b/gui/android.py @@ -909,9 +909,6 @@ class ElectrumGui: network = _network config = _config network.register_callback('updated', update_callback) - network.register_callback('connected', update_callback) - network.register_callback('disconnected', update_callback) - network.register_callback('disconnecting', update_callback) contacts = util.StoreDict(config, 'contacts') diff --git a/gui/stdio.py b/gui/stdio.py index e338ba96c..8688690d5 100644 --- a/gui/stdio.py +++ b/gui/stdio.py @@ -35,9 +35,7 @@ class ElectrumGui: self.contacts = StoreDict(self.config, 'contacts') self.wallet.network.register_callback('updated', self.updated) - self.wallet.network.register_callback('connected', self.connected) - self.wallet.network.register_callback('disconnected', self.disconnected) - self.wallet.network.register_callback('disconnecting', self.disconnecting) + self.wallet.network.register_callback('peers', self.peers) self.wallet.network.register_callback('banner', self.print_banner) self.commands = [_("[h] - displays this help text"), \ @@ -73,15 +71,6 @@ class ElectrumGui: for s in l: print (s) - def connected(self): - print ("connected") - - def disconnected(self): - print ("disconnected") - - def disconnecting(self): - print ("disconnecting") - def updated(self): s = self.get_balance() if s != self.last_balance: diff --git a/gui/text.py b/gui/text.py index bae39af33..5d1e24212 100644 --- a/gui/text.py +++ b/gui/text.py @@ -54,9 +54,6 @@ class ElectrumGui: if self.network: self.network.register_callback('updated', self.update) - self.network.register_callback('connected', self.refresh) - self.network.register_callback('disconnected', self.refresh) - self.network.register_callback('disconnecting', self.refresh) self.tab_names = [_("History"), _("Send"), _("Receive"), _("Addresses"), _("Contacts"), _("Banner")] self.num_tabs = len(self.tab_names)