def setup_dialog(self, window):
    self.wallet = window.parent().wallet
    self.update_wallet_name(self.wallet)
    self.user_input = False
    self.d = WindowModalDialog(window, 'Setup Dialog')
    self.d.setMinimumWidth(500)
    self.d.setMinimumHeight(210)
    self.d.setMaximumHeight(320)
    self.d.setContentsMargins(11, 11, 1, 1)
    self.hbox = QHBoxLayout(self.d)
    vbox = QVBoxLayout()
    logo = QLabel()
    self.hbox.addWidget(logo)
    logo.setPixmap(QPixmap(icon_path('revealer.png')))
    logo.setAlignment(Qt.AlignLeft)
    self.hbox.addSpacing(16)
    vbox.addWidget(WWLabel((((('<b>' + _('Revealer Secret Backup Plugin')) + '</b><br>') + _('To encrypt your backup, first we need to load some noise.')) + '<br/>')))
    vbox.addSpacing(7)
    bcreate = QPushButton(_('Create a new Revealer'))
    bcreate.setMaximumWidth(181)
    bcreate.setDefault(True)
    vbox.addWidget(bcreate, Qt.AlignCenter)
    self.load_noise = ScanQRTextEdit()
    self.load_noise.setTabChangesFocus(True)
    self.load_noise.textChanged.connect(self.on_edit)
    self.load_noise.setMaximumHeight(33)
    self.hbox.addLayout(vbox)
    vbox.addWidget(WWLabel(_("or type an existing revealer code below and click 'next':")))
    vbox.addWidget(self.load_noise)
    vbox.addSpacing(3)
    self.next_button = QPushButton(_('Next'), self.d)
    self.next_button.setEnabled(False)
    vbox.addLayout(Buttons(self.next_button))
    self.next_button.clicked.connect(self.d.close)
    self.next_button.clicked.connect(partial(self.cypherseed_dialog, window))
    vbox.addWidget(QLabel(((((('<b>' + _('Warning')) + '</b>: ') + _('Each revealer should be used only once.')) + '<br>') + _('more information at <a href="https://revealer.cc/faq">https://revealer.cc/faq</a>'))))

    def mk_digital():
        try:
            self.make_digital(self.d)
        except Exception:
            self.logger.exception('')
        else:
            self.cypherseed_dialog(window)
    bcreate.clicked.connect(mk_digital)
    return bool(self.d.exec_())
def setup_dialog(self, window):
    self.wallet = window.parent().wallet
    self.update_wallet_name(self.wallet)
    self.user_input = False
    self.d = WindowModalDialog(window, 'Setup Dialog')
    self.d.setMinimumWidth(500)
    self.d.setMinimumHeight(210)
    self.d.setMaximumHeight(320)
    self.d.setContentsMargins(11, 11, 1, 1)
    self.hbox = QHBoxLayout(self.d)
    vbox = QVBoxLayout()
    logo = QLabel()
    self.hbox.addWidget(logo)
    logo.setPixmap(QPixmap(icon_path('revealer.png')))
    logo.setAlignment(Qt.AlignLeft)
    self.hbox.addSpacing(16)
    vbox.addWidget(WWLabel((((('<b>' + _('Revealer Secret Backup Plugin')) + '</b><br>') + _('To encrypt your backup, first we need to load some noise.')) + '<br/>')))
    vbox.addSpacing(7)
    bcreate = QPushButton(_('Create a new Revealer'))
    bcreate.setMaximumWidth(181)
    bcreate.setDefault(True)
    vbox.addWidget(bcreate, Qt.AlignCenter)
    self.load_noise = ScanQRTextEdit()
    self.load_noise.setTabChangesFocus(True)
    self.load_noise.textChanged.connect(self.on_edit)
    self.load_noise.setMaximumHeight(33)
    self.hbox.addLayout(vbox)
    vbox.addWidget(WWLabel(_("or type an existing revealer code below and click 'next':")))
    vbox.addWidget(self.load_noise)
    vbox.addSpacing(3)
    self.next_button = QPushButton(_('Next'), self.d)
    self.next_button.setEnabled(False)
    vbox.addLayout(Buttons(self.next_button))
    self.next_button.clicked.connect(self.d.close)
    self.next_button.clicked.connect(partial(self.cypherseed_dialog, window))
    vbox.addWidget(QLabel(((((('<b>' + _('Warning')) + '</b>: ') + _('Each revealer should be used only once.')) + '<br>') + _('more information at <a href="https://revealer.cc/faq">https://revealer.cc/faq</a>'))))

    def mk_digital():
        try:
            self.make_digital(self.d)
        except Exception:
            self.logger.exception()
        else:
            self.cypherseed_dialog(window)
    bcreate.clicked.connect(mk_digital)
    return bool(self.d.exec_())