Skip to content

Commit 577b0ff

Browse files
committed
Merge #409: Fix window title of wallet loading window
01bff8f 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| |---|---| |![Screenshot from 2021-08-24 00-02-18](https://user-images.githubusercontent.com/85434418/130500309-2f0af2c9-55f0-4609-a92b-3156800fa92e.png)|![Screenshot from 2021-09-07 18-19-10](https://user-images.githubusercontent.com/85434418/132351394-1ee4a36c-3ba9-4d1a-a8f3-f17804fb856a.png)| ACKs for top commit: jarolrod: ACK 01bff8f hebasto: ACK 01bff8f, tested on Linux Mint 20.2 (Qt 5.12.8). Tree-SHA512: cd21c40752eb1c0afb5ec61b8a40e900bc3aa05749963f7957ece6024e4957f5bb37e0eb4f95aac488f5e08aea51fe13b023b05d8302a08c88dcc6790410ba64
2 parents 7962c97 + 01bff8f commit 577b0ff

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)