URI: 
       tfix create_new_account - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit e6208e2747a83e5d41b6532d1d6e52d08bd0bd64
   DIR parent 1ff2f1b30801f0f90b45b08b98c480b119c9196d
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Wed,  7 Aug 2013 21:53:05 +0200
       
       fix create_new_account
       
       Diffstat:
         M gui/gui_classic.py                  |      21 +++++++++++++++------
         M lib/wallet.py                       |       2 +-
       
       2 files changed, 16 insertions(+), 7 deletions(-)
       ---
   DIR diff --git a/gui/gui_classic.py b/gui/gui_classic.py
       t@@ -1429,15 +1429,24 @@ class ElectrumWindow(QMainWindow):
                    else:
                        QMessageBox.warning(self, _('Error'), _('Invalid Address'), _('OK'))
        
       +
            def new_account_dialog(self):
                text, ok = QInputDialog.getText(self, _('New Account'), _('Name') + ':')
       +        if not ok or not text: 
       +            return
                name = unicode(text)
       -        if ok:
       -            self.wallet.create_new_account(name)
       -            self.wallet.synchronize()
       -            self.update_contacts_tab()
       -            self.update_history_tab()
       -            self.update_completions()
       +        try:
       +            self.create_new_account(name)
       +        except:
       +            QMessageBox.warning(self, _('Error'), _('Incorrect Password'), _('OK'))
       +            
       +    @protected
       +    def create_new_account(self, name, password):
       +        self.wallet.create_new_account(name, password)
       +        self.wallet.synchronize()
       +        self.update_receive_tab()
       +        self.update_history_tab()
       +        self.update_completions()
        
            def show_master_public_key(self):
                dialog = QDialog(self)
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -192,7 +192,7 @@ class Wallet:
                self.config.set_key('master_private_keys', self.master_private_keys, True)
        
                # create default account
       -        self.create_new_account('Main account')
       +        self.create_new_account('Main account', None)
        
        
            def create_new_account(self, name, password):