mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
keepkey: rm homescreen stuff (remnants from trezor?)
This commit is contained in:
parent
05697e51b8
commit
d92a4e8365
1 changed files with 0 additions and 22 deletions
|
@ -322,7 +322,6 @@ class SettingsDialog(WindowModalDialog):
|
||||||
config = devmgr.config
|
config = devmgr.config
|
||||||
handler = keystore.handler
|
handler = keystore.handler
|
||||||
thread = keystore.thread
|
thread = keystore.thread
|
||||||
hs_rows, hs_cols = (64, 128)
|
|
||||||
|
|
||||||
def invoke_client(method, *args, **kw_args):
|
def invoke_client(method, *args, **kw_args):
|
||||||
unpair_after = kw_args.pop('unpair_after', False)
|
unpair_after = kw_args.pop('unpair_after', False)
|
||||||
|
@ -396,27 +395,6 @@ class SettingsDialog(WindowModalDialog):
|
||||||
return
|
return
|
||||||
invoke_client('toggle_passphrase', unpair_after=currently_enabled)
|
invoke_client('toggle_passphrase', unpair_after=currently_enabled)
|
||||||
|
|
||||||
def change_homescreen():
|
|
||||||
from PIL import Image # FIXME
|
|
||||||
dialog = QFileDialog(self, _("Choose Homescreen"))
|
|
||||||
filename, __ = dialog.getOpenFileName()
|
|
||||||
if filename:
|
|
||||||
im = Image.open(str(filename))
|
|
||||||
if im.size != (hs_cols, hs_rows):
|
|
||||||
raise Exception('Image must be 64 x 128 pixels')
|
|
||||||
im = im.convert('1')
|
|
||||||
pix = im.load()
|
|
||||||
img = ''
|
|
||||||
for j in range(hs_rows):
|
|
||||||
for i in range(hs_cols):
|
|
||||||
img += '1' if pix[i, j] else '0'
|
|
||||||
img = ''.join(chr(int(img[i:i + 8], 2))
|
|
||||||
for i in range(0, len(img), 8))
|
|
||||||
invoke_client('change_homescreen', img)
|
|
||||||
|
|
||||||
def clear_homescreen():
|
|
||||||
invoke_client('change_homescreen', '\x00')
|
|
||||||
|
|
||||||
def set_pin():
|
def set_pin():
|
||||||
invoke_client('set_pin', remove=False)
|
invoke_client('set_pin', remove=False)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue