URI: 
       tencapsulate variable in openalias plugin - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit bb7437e53448b7502b98ebe782621039418d27b4
   DIR parent ee5f499fc1d146368c0e7c44195a4d68d81e865f
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Sun, 31 May 2015 14:33:26 +0200
       
       encapsulate variable in openalias plugin
       
       Diffstat:
         M gui/qt/main_window.py               |       1 -
         M plugins/openalias.py                |       9 +++++----
       
       2 files changed, 5 insertions(+), 5 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -477,7 +477,6 @@ class ElectrumWindow(QMainWindow):
        
            def connect_slots(self, sender):
                self.connect(sender, QtCore.SIGNAL('timersignal'), self.timer_actions)
       -        self.previous_payto_e=''
        
            def timer_actions(self):
                if self.need_update.is_set():
   DIR diff --git a/plugins/openalias.py b/plugins/openalias.py
       t@@ -63,6 +63,7 @@ class Plugin(BasePlugin):
                BasePlugin.__init__(self, gui, name)
                self._is_available = OA_READY
                self.print_error('OA_READY is ' + str(OA_READY))
       +        self.previous_payto = ''
        
            @hook
            def init_qt(self, gui):
       t@@ -87,9 +88,9 @@ class Plugin(BasePlugin):
                url = str(self.win.payto_e.toPlainText())
                url = url.replace('@', '.')  # support email-style addresses, per the OA standard
        
       -        if url == self.win.previous_payto_e:
       +        if url == self.previous_payto:
                    return
       -        self.win.previous_payto_e = url
       +        self.previous_payto = url
        
                if not (('.' in url) and (not '<' in url) and (not ' ' in url)):
                    return
       t@@ -97,13 +98,13 @@ class Plugin(BasePlugin):
                data = self.resolve(url)
        
                if not data:
       -            self.win.previous_payto_e = url
       +            self.previous_payto = url
                    return True
        
                address, name = data
                new_url = url + ' <' + address + '>'
                self.win.payto_e.setText(new_url)
       -        self.win.previous_payto_e = new_url
       +        self.previous_payto = new_url
        
                if self.config.get('openalias_autoadd') == 'checked':
                    self.win.contacts[url] = ('openalias', name)