Skip to content

Commit

Permalink
Merge bitcoin-core/gui#409: Fix window title of wallet loading window
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hebasto authored and vijaydasmp committed Sep 11, 2024
1 parent b7960c4 commit b18e009
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions src/qt/walletcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,12 @@ WalletControllerActivity::~WalletControllerActivity()
delete m_progress_dialog;
}

void WalletControllerActivity::showProgressDialog(const QString& label_text)
void WalletControllerActivity::showProgressDialog(const QString& title_text, const QString& label_text)
{
assert(!m_progress_dialog);
m_progress_dialog = new QProgressDialog(m_parent_widget);

m_progress_dialog->setWindowTitle(title_text);
m_progress_dialog->setLabelText(label_text);
m_progress_dialog->setRange(0, 0);
m_progress_dialog->setCancelButton(nullptr);
Expand Down Expand Up @@ -251,7 +252,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;
Expand Down Expand Up @@ -334,7 +340,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().walletLoader().loadWallet(path, m_error_message, m_warning_message);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/walletcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class WalletControllerActivity : public QObject
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);
void destroyProgressDialog();

WalletController* const m_wallet_controller;
Expand Down

0 comments on commit b18e009

Please sign in to comment.