URI: 
       tnew 'disconnecting' callback for requested disconnection - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit a4d17d3cb992990fb402aab7fac8cb2c0f487b07
   DIR parent 3cc382b7a0c48fc13d7cd883455c15b0ee894d85
  HTML Author: thomasv <thomasv@gitorious>
       Date:   Mon, 22 Oct 2012 15:15:52 +0200
       
       new 'disconnecting' callback for requested disconnection
       
       Diffstat:
         M lib/gui_qt.py                       |       1 +
         M lib/interface.py                    |       5 +++--
       
       2 files changed, 4 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/lib/gui_qt.py b/lib/gui_qt.py
       t@@ -210,6 +210,7 @@ class ElectrumWindow(QMainWindow):
                self.wallet.interface.register_callback('updated', self.update_callback)
                self.wallet.interface.register_callback('connected', self.update_callback)
                self.wallet.interface.register_callback('disconnected', self.update_callback)
       +        self.wallet.interface.register_callback('disconnecting', self.update_callback)
        
                self.detailed_view = config.get('qt_detailed_view', False)
        
   DIR diff --git a/lib/interface.py b/lib/interface.py
       t@@ -103,7 +103,8 @@ class Interface(threading.Thread):
                            if (method, params) in v:
                                channel = k
                        else:
       -                    raise
       +                    print "received expected notification", method, params
       +                    return
        
                    if method == 'blockchain.numblocks.subscribe':
                        result = params[0]
       t@@ -435,7 +436,7 @@ class Interface(threading.Thread):
                        self.s.shutdown(socket.SHUT_RDWR)
                        self.s.close()
                    self.is_connected = False  # this exits the polling loop
       -
       +            self.trigger_callback('disconnecting') # for actively disconnecting
        
            def is_empty(self, channel):
                q = self.responses.get(channel)