qt: automatically proceed wizard when unlocking existing wallet or succesful retrieve of xpub
for new wallet
This commit is contained in:
@@ -1228,6 +1228,9 @@ class WCHWUnlock(WizardComponent, Logger):
|
|||||||
else:
|
else:
|
||||||
self.valid = False
|
self.valid = False
|
||||||
|
|
||||||
|
if self.valid:
|
||||||
|
self.wizard.requestNext.emit() # via signal, so it triggers Next/Finish on GUI thread after on_updated()
|
||||||
|
|
||||||
def apply(self):
|
def apply(self):
|
||||||
if self.valid:
|
if self.valid:
|
||||||
self.wizard_data['password'] = self.password
|
self.wizard_data['password'] = self.password
|
||||||
@@ -1302,6 +1305,9 @@ class WCHWXPub(WizardComponent, Logger):
|
|||||||
else:
|
else:
|
||||||
self.valid = False
|
self.valid = False
|
||||||
|
|
||||||
|
if self.valid:
|
||||||
|
self.wizard.requestNext.emit() # via signal, so it triggers Next/Finish on GUI thread after on_updated()
|
||||||
|
|
||||||
def apply(self):
|
def apply(self):
|
||||||
_name, _info = self.wizard_data['hardware_device']
|
_name, _info = self.wizard_data['hardware_device']
|
||||||
cosigner_data = self.wizard.current_cosigner(self.wizard_data)
|
cosigner_data = self.wizard.current_cosigner(self.wizard_data)
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ if TYPE_CHECKING:
|
|||||||
class QEAbstractWizard(QDialog, MessageBoxMixin):
|
class QEAbstractWizard(QDialog, MessageBoxMixin):
|
||||||
_logger = get_logger(__name__)
|
_logger = get_logger(__name__)
|
||||||
|
|
||||||
|
requestNext = pyqtSignal()
|
||||||
|
|
||||||
def __init__(self, config: 'SimpleConfig', app: 'QElectrumApplication', *, start_viewstate: 'WizardViewState' = None):
|
def __init__(self, config: 'SimpleConfig', app: 'QElectrumApplication', *, start_viewstate: 'WizardViewState' = None):
|
||||||
QDialog.__init__(self, None)
|
QDialog.__init__(self, None)
|
||||||
self.app = app
|
self.app = app
|
||||||
@@ -40,7 +42,7 @@ class QEAbstractWizard(QDialog, MessageBoxMixin):
|
|||||||
self.next_button = QPushButton(_("Next"), self)
|
self.next_button = QPushButton(_("Next"), self)
|
||||||
self.next_button.clicked.connect(self.on_next_button_clicked)
|
self.next_button.clicked.connect(self.on_next_button_clicked)
|
||||||
self.next_button.setDefault(True)
|
self.next_button.setDefault(True)
|
||||||
|
self.requestNext.connect(self.on_next_button_clicked)
|
||||||
self.logo = QLabel()
|
self.logo = QLabel()
|
||||||
|
|
||||||
please_wait_layout = QVBoxLayout()
|
please_wait_layout = QVBoxLayout()
|
||||||
|
|||||||
Reference in New Issue
Block a user