2014-06-04 17:42:29 -07:00
|
|
|
from kivy.app import App
|
|
|
|
from kivy.factory import Factory
|
|
|
|
from kivy.properties import ObjectProperty
|
|
|
|
|
|
|
|
Factory.register('QrScannerDialog', module='electrum_gui.kivy.uix.dialogs.qr_scanner')
|
|
|
|
|
|
|
|
class NewContactDialog(Factory.AnimatedPopup):
|
|
|
|
|
|
|
|
def load_qr_scanner(self):
|
|
|
|
self.dismiss()
|
2014-06-24 09:39:11 -07:00
|
|
|
App.get_running_app().scan_qr(on_complete=self.on_complete)
|
2014-06-04 17:42:29 -07:00
|
|
|
|
2014-06-21 10:09:31 -07:00
|
|
|
def on_complete(self, instance, uri):
|
2014-06-04 17:42:29 -07:00
|
|
|
self.new_contact(uri=uri)
|
|
|
|
|
|
|
|
def new_contact(self, uri={}):
|
|
|
|
# load NewContactScreen
|
|
|
|
app = App.get_running_app()
|
|
|
|
#app.root.
|
|
|
|
# set contents of uri in the new contact screen
|