1
0

kivy: revert to using zxing

This commit is contained in:
ThomasV
2016-03-17 08:16:15 +01:00
parent 5dfde10d30
commit 1f1dbaf523
2 changed files with 2 additions and 13 deletions

View File

@@ -241,7 +241,7 @@ class ElectrumWindow(App):
self.show_error("invoice error:" + pr.error)
self.send_screen.do_clear()
def on_qr(self, d, data):
def on_qr(self, data):
from electrum.bitcoin import base_decode, is_address
if is_address(data):
self.set_URI(data)
@@ -310,17 +310,6 @@ class ElectrumWindow(App):
popup.open()
def scan_qr(self, on_complete):
self.scan_qr_android(on_complete)
def scan_qr_android(self, on_complete):
dlg = Cache.get('electrum_widgets', 'QrScannerDialog')
if not dlg:
dlg = Factory.QrScannerDialog()
Cache.append('electrum_widgets', 'QrScannerDialog', dlg)
dlg.bind(on_complete=on_complete)
dlg.open()
def scan_qr_zxing(self, on_complete):
if platform != 'android':
return
from jnius import autoclass

View File

@@ -562,7 +562,7 @@ class RestoreXpubDialog(WizardDialog):
self.ids.next.disabled = not bool(self._test(self.get_text()))
def scan_xpub(self):
def on_complete(d, text):
def on_complete(text):
self.ids.text_input_seed.text = text
self.app.scan_qr(on_complete)