Skip to content

Commit 01bff8f

Browse files
committed
qt: Fix WalletControllerActivity progress dialog title
The WalletControllerActivity progress dialog had title of "Bitcoin-Qt". The window title for opening wallet window should be "Open Wallet", for creating wallet window should be "Create Wallet", and for the window that is displayed when wallets are being loaded at startup should be "Load Wallets". This PR fixes that.
1 parent 9013f23 commit 01bff8f

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

src/qt/walletcontroller.cpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,13 @@ WalletControllerActivity::WalletControllerActivity(WalletController* wallet_cont
184184
connect(this, &WalletControllerActivity::finished, this, &QObject::deleteLater);
185185
}
186186

187-
void WalletControllerActivity::showProgressDialog(const QString& label_text)
187+
void WalletControllerActivity::showProgressDialog(const QString& title_text, const QString& label_text)
188188
{
189189
auto progress_dialog = new QProgressDialog(m_parent_widget);
190190
progress_dialog->setAttribute(Qt::WA_DeleteOnClose);
191191
connect(this, &WalletControllerActivity::finished, progress_dialog, &QWidget::close);
192192

193+
progress_dialog->setWindowTitle(title_text);
193194
progress_dialog->setLabelText(label_text);
194195
progress_dialog->setRange(0, 0);
195196
progress_dialog->setCancelButton(nullptr);
@@ -231,7 +232,12 @@ void CreateWalletActivity::askPassphrase()
231232

232233
void CreateWalletActivity::createWallet()
233234
{
234-
showProgressDialog(tr("Creating Wallet <b>%1</b>…").arg(m_create_wallet_dialog->walletName().toHtmlEscaped()));
235+
showProgressDialog(
236+
//: Title of window indicating the progress of creation of a new wallet.
237+
tr("Create Wallet"),
238+
/*: Descriptive text of the create wallet progress window which indicates
239+
to the user which wallet is currently being created. */
240+
tr("Creating Wallet <b>%1</b>…").arg(m_create_wallet_dialog->walletName().toHtmlEscaped()));
235241

236242
std::string name = m_create_wallet_dialog->walletName().toStdString();
237243
uint64_t flags = 0;
@@ -322,7 +328,12 @@ void OpenWalletActivity::open(const std::string& path)
322328
{
323329
QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path);
324330

325-
showProgressDialog(tr("Opening Wallet <b>%1</b>…").arg(name.toHtmlEscaped()));
331+
showProgressDialog(
332+
//: Title of window indicating the progress of opening of a wallet.
333+
tr("Open Wallet"),
334+
/*: Descriptive text of the open wallet progress window which indicates
335+
to the user which wallet is currently being opened. */
336+
tr("Opening Wallet <b>%1</b>…").arg(name.toHtmlEscaped()));
326337

327338
QTimer::singleShot(0, worker(), [this, path] {
328339
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
340351

341352
void LoadWalletsActivity::load()
342353
{
343-
showProgressDialog(tr("Loading wallets…"));
354+
showProgressDialog(
355+
//: Title of progress window which is displayed when wallets are being loaded.
356+
tr("Load Wallets"),
357+
/*: Descriptive text of the load wallets progress window which indicates to
358+
the user that wallets are currently being loaded.*/
359+
tr("Loading wallets…"));
344360

345361
QTimer::singleShot(0, worker(), [this] {
346362
for (auto& wallet : node().walletClient().getWallets()) {

src/qt/walletcontroller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class WalletControllerActivity : public QObject
9696
interfaces::Node& node() const { return m_wallet_controller->m_node; }
9797
QObject* worker() const { return m_wallet_controller->m_activity_worker; }
9898

99-
void showProgressDialog(const QString& label_text);
99+
void showProgressDialog(const QString& title_text, const QString& label_text);
100100

101101
WalletController* const m_wallet_controller;
102102
QWidget* const m_parent_widget;

0 commit comments

Comments
 (0)