mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-05 05:15:12 +00:00
ScanQRTextEdit allow_multi=True for sweeping and importing privkeys into existing wallet
This commit is contained in:
parent
aef0444867
commit
3de5b91c15
2 changed files with 5 additions and 4 deletions
|
@ -2414,7 +2414,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
vbox = QVBoxLayout(d)
|
||||
vbox.addWidget(QLabel(_("Enter private keys:")))
|
||||
|
||||
keys_e = ScanQRTextEdit()
|
||||
keys_e = ScanQRTextEdit(allow_multi=True)
|
||||
keys_e.setTabChangesFocus(True)
|
||||
vbox.addWidget(keys_e)
|
||||
|
||||
|
@ -2464,7 +2464,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
self.warn_if_watching_only()
|
||||
|
||||
def _do_import(self, title, msg, func):
|
||||
text = text_dialog(self, title, msg + ' :', _('Import'))
|
||||
text = text_dialog(self, title, msg + ' :', _('Import'),
|
||||
allow_multi=True)
|
||||
if not text:
|
||||
return
|
||||
bad = []
|
||||
|
|
|
@ -251,14 +251,14 @@ def line_dialog(parent, title, label, ok_label, default=None):
|
|||
if dialog.exec_():
|
||||
return txt.text()
|
||||
|
||||
def text_dialog(parent, title, label, ok_label, default=None):
|
||||
def text_dialog(parent, title, label, ok_label, default=None, allow_multi=False):
|
||||
from .qrtextedit import ScanQRTextEdit
|
||||
dialog = WindowModalDialog(parent, title)
|
||||
dialog.setMinimumWidth(500)
|
||||
l = QVBoxLayout()
|
||||
dialog.setLayout(l)
|
||||
l.addWidget(QLabel(label))
|
||||
txt = ScanQRTextEdit()
|
||||
txt = ScanQRTextEdit(allow_multi=allow_multi)
|
||||
if default:
|
||||
txt.setText(default)
|
||||
l.addWidget(txt)
|
||||
|
|
Loading…
Add table
Reference in a new issue