URI: 
       tset wallet.can_change_password and wallet.has_seed for trezor - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 20f93f7df0752d81f49a69480d109b4b6972a313
   DIR parent 11e1e0e9239e18f2a8774869e455e2fdf705c2f0
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Tue, 19 Aug 2014 10:36:55 +0200
       
       set wallet.can_change_password and wallet.has_seed for trezor
       
       Diffstat:
         M gui/qt/main_window.py               |      16 ++++------------
         M lib/wallet.py                       |       6 ++++++
         M plugins/trezor.py                   |       6 ++++++
       
       3 files changed, 16 insertions(+), 12 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -221,7 +221,7 @@ class ElectrumWindow(QMainWindow):
                # update menus
                self.new_account_menu.setEnabled(self.wallet.can_create_accounts())
                self.private_keys_menu.setEnabled(not self.wallet.is_watching_only())
       -        self.password_menu.setEnabled(not self.wallet.is_watching_only())
       +        self.password_menu.setEnabled(self.wallet.can_change_password())
                self.seed_menu.setEnabled(self.wallet.has_seed())
                self.mpk_menu.setEnabled(self.wallet.is_deterministic())
                self.import_menu.setEnabled(self.wallet.can_import())
       t@@ -1725,17 +1725,9 @@ class ElectrumWindow(QMainWindow):
        
        
            def update_buttons_on_seed(self):
       -        if self.wallet.has_seed():
       -           self.seed_button.show()
       -        else:
       -           self.seed_button.hide()
       -
       -        if not self.wallet.is_watching_only():
       -           self.password_button.show()
       -           self.send_button.setText(_("Send"))
       -        else:
       -           self.password_button.hide()
       -           self.send_button.setText(_("Create unsigned transaction"))
       +        self.seed_button.setVisible(self.wallet.has_seed())
       +        self.password_button.setVisible(self.wallet.can_change_password())
       +        self.send_button.setText(_("Create unsigned transaction") if self.wallet.is_watching_only() else _("Send"))
        
        
            def change_password_dialog(self):
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -992,6 +992,12 @@ class Abstract_Wallet(object):
            def can_sign(self, tx):
                pass
        
       +    def is_watching_only(self):
       +        False
       +
       +    def can_change_password(self):
       +        return not self.is_watching_only()
       +
        class Imported_Wallet(Abstract_Wallet):
        
            def __init__(self, storage):
   DIR diff --git a/plugins/trezor.py b/plugins/trezor.py
       t@@ -108,6 +108,12 @@ class TrezorWallet(NewWallet):
            def can_create_accounts(self):
                return True
        
       +    def can_change_password(self):
       +        return False
       +
       +    def has_seed(self):
       +        return False
       +
            def is_watching_only(self):
                return False