electrum

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

commit 622fb6c08b32383e91f0c42833d46814a187d4c3
parent 34cb1f6620dbaffe963c89eba1e0d8e65bd48539
Author: ThomasV <thomasv@gitorious>
Date:   Fri,  5 Sep 2014 16:28:53 +0200

add wallet categories

Diffstat:
Mgui/qt/installwizard.py | 8+++++---
Mlib/wallet.py | 13+++++++------
Mplugins/btchipwallet.py | 2+-
Mplugins/trezor.py | 2+-
4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py @@ -78,14 +78,16 @@ class InstallWizard(QDialog): self.wallet_types = [ ('standard', _("Standard wallet")), - #('2fa', _("Wallet with two-factor authentication")), + ('twofactor', _("Wallet with two-factor authentication")), ('multisig', _("Multi-signatures wallet")), ('hardware', _("Hardware wallet")), ] - for i, (t,l) in enumerate(self.wallet_types): + for i, (wtype,name) in enumerate(self.wallet_types): + if not filter(lambda x:x[0]==wtype, electrum.wallet.wallet_types): + continue button = QRadioButton(gb2) - button.setText(l) + button.setText(name) vbox.addWidget(button) group2.addButton(button) group2.setId(button, i) diff --git a/lib/wallet.py b/lib/wallet.py @@ -1578,12 +1578,13 @@ class OldWallet(Deterministic_Wallet): wallet_types = [ - ('old', ("Old wallet"), OldWallet), - ('xpub', ("BIP32 Import"), BIP32_Simple_Wallet), - ('standard', ("Standard wallet"), NewWallet), - ('imported', ("Imported wallet"), Imported_Wallet), - ('2of2', ("Multisig wallet (2 of 2)"), Wallet_2of2), - ('2of3', ("Multisig wallet (2 of 3)"), Wallet_2of3) + # category type description constructor + ('standard', 'old', ("Old wallet"), OldWallet), + ('standard', 'xpub', ("BIP32 Import"), BIP32_Simple_Wallet), + ('standard', 'standard', ("Standard wallet"), NewWallet), + ('standard', 'imported', ("Imported wallet"), Imported_Wallet), + ('multisig', '2of2', ("Multisig wallet (2 of 2)"), Wallet_2of2), + ('multisig', '2of3', ("Multisig wallet (2 of 3)"), Wallet_2of3) ] # former WalletFactory diff --git a/plugins/btchipwallet.py b/plugins/btchipwallet.py @@ -53,7 +53,7 @@ class Plugin(BasePlugin): BasePlugin.__init__(self, gui, name) self._is_available = self._init() self.wallet = None - electrum.wallet.wallet_types.append(('btchip', _("BTChip wallet"), BTChipWallet)) + electrum.wallet.wallet_types.append(('hardware', 'btchip', _("BTChip wallet"), BTChipWallet)) def _init(self): diff --git a/plugins/trezor.py b/plugins/trezor.py @@ -48,7 +48,7 @@ class Plugin(BasePlugin): self._is_available = self._init() self._requires_settings = True self.wallet = None - electrum.wallet.wallet_types.append(('trezor', _("Trezor wallet"), TrezorWallet)) + electrum.wallet.wallet_types.append(('hardware', 'trezor', _("Trezor wallet"), TrezorWallet)) def _init(self): return TREZOR