|
|
@ -28,8 +28,8 @@ Builder.load_string(''' |
|
|
|
text: _('Paste') |
|
|
|
on_release: s.do_paste() |
|
|
|
Button: |
|
|
|
text: _('Paste sample') |
|
|
|
on_release: s.do_paste_sample() |
|
|
|
text: _('Paste using xclip') |
|
|
|
on_release: s.do_paste_xclip() |
|
|
|
Button: |
|
|
|
text: _('Clear') |
|
|
|
on_release: s.do_clear() |
|
|
@ -60,8 +60,10 @@ class LightningPayerDialog(Factory.Popup): |
|
|
|
def dismiss(self, *args, **kwargs): |
|
|
|
super(LightningPayerDialog, self).dismiss(*args, **kwargs) |
|
|
|
self.app.wallet.network.lightningrpc.setConsole(None) |
|
|
|
def do_paste_sample(self): |
|
|
|
self.invoice_data = "lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq8rkx3yf5tcsyz3d73gafnh3cax9rn449d9p5uxz9ezhhypd0elx87sjle52x86fux2ypatgddc6k63n7erqz25le42c4u4ecky03ylcqca784w" |
|
|
|
def do_paste_xclip(self): |
|
|
|
import subprocess |
|
|
|
proc = subprocess.run(["xclip","-sel","clipboard","-o"], stdout=subprocess.PIPE) |
|
|
|
self.invoice_data = proc.stdout.decode("ascii") |
|
|
|
def do_paste(self): |
|
|
|
contents = self.app._clipboard.paste() |
|
|
|
if not contents: |
|
|
|