electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 836babcb35eb5b667cc06e31d4d96d9b8ce43330
parent 57c1e6e92b772000915ba36d8a87a2dd471662ba
Author: ThomasV <thomasv@gitorious>
Date:   Fri, 30 Mar 2012 18:35:26 +0200

information dialog

Diffstat:
Mclient/gui_qt.py | 32++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/client/gui_qt.py b/client/gui_qt.py @@ -913,6 +913,30 @@ class ElectrumGui(): self.wallet = wallet self.app = QApplication(sys.argv) + def waiting_dialog(self): + + s = Timer() + s.start() + w = QDialog() + w.resize(100, 50) + w.move(300, 300) + w.setWindowTitle('Electrum') + l = QLabel('...') + vbox = QVBoxLayout() + vbox.addWidget(l) + w.setLayout(vbox) + w.show() + def f(): + if self.wallet.up_to_date: w.close() + else: + l.setText("Please wait...\nGenerating addresses: %d"%len(self.wallet.all_addresses())) + pass + w.connect(s, QtCore.SIGNAL('timersignal'), f) + self.wallet.interface.poke() + w.exec_() + w.destroy() + + def restore_or_create(self): msg = "Wallet file not found.\nDo you want to create a new wallet,\n or to restore an existing one?" @@ -925,11 +949,11 @@ class ElectrumGui(): if not ElectrumWindow.network_dialog( wallet, parent=None ): return False if not is_recovery: - wallet.new_seed(None) wallet.init_mpk( wallet.seed ) wallet.up_to_date_event.clear() - wallet.update() + wallet.up_to_date = False + self.waiting_dialog() # run a dialog indicating the seed, ask the user to remember it ElectrumWindow.show_seed_dialog(wallet) #ask for password @@ -939,8 +963,8 @@ class ElectrumGui(): if not ElectrumWindow.seed_dialog( wallet ): return False wallet.init_mpk( wallet.seed ) wallet.up_to_date_event.clear() - wallet.update() - + wallet.up_to_date = False + self.waiting_dialog() if wallet.is_found(): # history and addressbook wallet.update_tx_history()