electrum

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

commit 7bcc55ae572fd20f2d46d2abc0c5b4c8ecbe5516
parent a81e96bce07bbef37cdc8262a4bc14a17af1d557
Author: Johann Bauer <bauerj@bauerj.eu>
Date:   Mon, 14 May 2018 16:57:11 +0200

Trezor: Disable 'Change Homescreen' if PIL is unavailable

Diffstat:
Mplugins/trezor/qt.py | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/plugins/trezor/qt.py b/plugins/trezor/qt.py @@ -515,6 +515,13 @@ class SettingsDialog(WindowModalDialog): homescreen_change_button = QPushButton(_("Change...")) homescreen_clear_button = QPushButton(_("Reset")) homescreen_change_button.clicked.connect(change_homescreen) + try: + import PIL + except ImportError: + homescreen_change_button.setDisabled(True) + homescreen_change_button.setToolTip( + _("Required package 'PIL' is not available - Please install it or use the Trezor website instead.") + ) homescreen_clear_button.clicked.connect(clear_homescreen) homescreen_msg = QLabel(_("You can set the homescreen on your " "device to personalize it. You must "