mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
Merge bitcoin-core/gui#409: Fix window title of wallet loading window
01bff8f049
qt: Fix WalletControllerActivity progress dialog title (Shashwat) Pull request description: Throughout the GUI, the title of the window, tells about the purpose of the window. This was not true for the title of wallet loading wallet. This PR fixes this issue by renaming the wallet loading window title to 'Open Wallet' Changes introduced in this PR (Runned Bitcoin-GUI on signet network) |Master|PR| |---|---| ||| ACKs for top commit: jarolrod: ACK01bff8f
hebasto: ACK01bff8f049
, tested on Linux Mint 20.2 (Qt 5.12.8). Tree-SHA512: cd21c40752eb1c0afb5ec61b8a40e900bc3aa05749963f7957ece6024e4957f5bb37e0eb4f95aac488f5e08aea51fe13b023b05d8302a08c88dcc6790410ba64
This commit is contained in:
commit
577b0ffd2e
2 changed files with 21 additions and 5 deletions
|
@ -184,12 +184,13 @@ WalletControllerActivity::WalletControllerActivity(WalletController* wallet_cont
|
|||
connect(this, &WalletControllerActivity::finished, this, &QObject::deleteLater);
|
||||
}
|
||||
|
||||
void WalletControllerActivity::showProgressDialog(const QString& label_text)
|
||||
void WalletControllerActivity::showProgressDialog(const QString& title_text, const QString& label_text)
|
||||
{
|
||||
auto progress_dialog = new QProgressDialog(m_parent_widget);
|
||||
progress_dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(this, &WalletControllerActivity::finished, progress_dialog, &QWidget::close);
|
||||
|
||||
progress_dialog->setWindowTitle(title_text);
|
||||
progress_dialog->setLabelText(label_text);
|
||||
progress_dialog->setRange(0, 0);
|
||||
progress_dialog->setCancelButton(nullptr);
|
||||
|
@ -231,7 +232,12 @@ void CreateWalletActivity::askPassphrase()
|
|||
|
||||
void CreateWalletActivity::createWallet()
|
||||
{
|
||||
showProgressDialog(tr("Creating Wallet <b>%1</b>…").arg(m_create_wallet_dialog->walletName().toHtmlEscaped()));
|
||||
showProgressDialog(
|
||||
//: Title of window indicating the progress of creation of a new wallet.
|
||||
tr("Create Wallet"),
|
||||
/*: Descriptive text of the create wallet progress window which indicates
|
||||
to the user which wallet is currently being created. */
|
||||
tr("Creating Wallet <b>%1</b>…").arg(m_create_wallet_dialog->walletName().toHtmlEscaped()));
|
||||
|
||||
std::string name = m_create_wallet_dialog->walletName().toStdString();
|
||||
uint64_t flags = 0;
|
||||
|
@ -322,7 +328,12 @@ void OpenWalletActivity::open(const std::string& path)
|
|||
{
|
||||
QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path);
|
||||
|
||||
showProgressDialog(tr("Opening Wallet <b>%1</b>…").arg(name.toHtmlEscaped()));
|
||||
showProgressDialog(
|
||||
//: Title of window indicating the progress of opening of a wallet.
|
||||
tr("Open Wallet"),
|
||||
/*: Descriptive text of the open wallet progress window which indicates
|
||||
to the user which wallet is currently being opened. */
|
||||
tr("Opening Wallet <b>%1</b>…").arg(name.toHtmlEscaped()));
|
||||
|
||||
QTimer::singleShot(0, worker(), [this, path] {
|
||||
std::unique_ptr<interfaces::Wallet> wallet = node().walletClient().loadWallet(path, m_error_message, m_warning_message);
|
||||
|
@ -340,7 +351,12 @@ LoadWalletsActivity::LoadWalletsActivity(WalletController* wallet_controller, QW
|
|||
|
||||
void LoadWalletsActivity::load()
|
||||
{
|
||||
showProgressDialog(tr("Loading wallets…"));
|
||||
showProgressDialog(
|
||||
//: Title of progress window which is displayed when wallets are being loaded.
|
||||
tr("Load Wallets"),
|
||||
/*: Descriptive text of the load wallets progress window which indicates to
|
||||
the user that wallets are currently being loaded.*/
|
||||
tr("Loading wallets…"));
|
||||
|
||||
QTimer::singleShot(0, worker(), [this] {
|
||||
for (auto& wallet : node().walletClient().getWallets()) {
|
||||
|
|
|
@ -96,7 +96,7 @@ protected:
|
|||
interfaces::Node& node() const { return m_wallet_controller->m_node; }
|
||||
QObject* worker() const { return m_wallet_controller->m_activity_worker; }
|
||||
|
||||
void showProgressDialog(const QString& label_text);
|
||||
void showProgressDialog(const QString& title_text, const QString& label_text);
|
||||
|
||||
WalletController* const m_wallet_controller;
|
||||
QWidget* const m_parent_widget;
|
||||
|
|
Loading…
Add table
Reference in a new issue