1
0

rewrite server connect wizard to new wizard style

'last' property on WizardComponents is now queried from UI, not from the wizard.
This allows the content of the WizardComponent itself to be taken into account.
This commit is contained in:
Sander van Grieken
2022-10-04 19:47:29 +02:00
parent 6ea3a16cc8
commit 15e2ed4f58
9 changed files with 76 additions and 37 deletions

View File

@@ -4,7 +4,7 @@ from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject
from PyQt5.QtQml import QQmlApplicationEngine
from electrum.logging import get_logger
from electrum.gui.wizard import NewWalletWizard
from electrum.gui.wizard import NewWalletWizard, ServerConnectWizard
class QEAbstractWizard(QObject):
_logger = get_logger(__name__)
@@ -99,3 +99,17 @@ class QENewWalletWizard(NewWalletWizard, QEAbstractWizard):
except Exception as e:
self._logger.error(repr(e))
self.createError.emit(str(e))
class QEServerConnectWizard(ServerConnectWizard, QEAbstractWizard):
def __init__(self, daemon, parent = None):
ServerConnectWizard.__init__(self, daemon)
QEAbstractWizard.__init__(self, parent)
self._daemon = daemon
# attach view names
self.navmap_merge({
'autoconnect': { 'gui': 'WCAutoConnect' },
'proxy_config': { 'gui': 'WCProxyConfig' },
'server_config': { 'gui': 'WCServerConfig' },
})