Changeset View
Changeset View
Standalone View
Standalone View
src/qt/createwalletdialog.cpp
// Copyright (c) 2019 The Bitcoin Core developers | // Copyright (c) 2019 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include <config/bitcoin-config.h> | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#include <qt/createwalletdialog.h> | #include <qt/createwalletdialog.h> | ||||
#include <qt/forms/ui_createwalletdialog.h> | #include <qt/forms/ui_createwalletdialog.h> | ||||
#include <QPushButton> | #include <QPushButton> | ||||
CreateWalletDialog::CreateWalletDialog(QWidget *parent) | CreateWalletDialog::CreateWalletDialog(QWidget *parent) | ||||
: QDialog(parent), ui(new Ui::CreateWalletDialog) { | : QDialog(parent), ui(new Ui::CreateWalletDialog) { | ||||
ui->setupUi(this); | ui->setupUi(this); | ||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setText("Create"); | ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Create")); | ||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); | ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); | ||||
ui->wallet_name_line_edit->setFocus(Qt::ActiveWindowFocusReason); | ui->wallet_name_line_edit->setFocus(Qt::ActiveWindowFocusReason); | ||||
connect(ui->wallet_name_line_edit, &QLineEdit::textEdited, | connect(ui->wallet_name_line_edit, &QLineEdit::textEdited, | ||||
[this](const QString &text) { | [this](const QString &text) { | ||||
ui->buttonBox->button(QDialogButtonBox::Ok) | ui->buttonBox->button(QDialogButtonBox::Ok) | ||||
->setEnabled(!text.isEmpty()); | ->setEnabled(!text.isEmpty()); | ||||
}); | }); | ||||
Show All 33 Lines |