diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/intro.cpp | 31 | ||||
-rw-r--r-- | src/qt/intro.h | 1 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 196f4b50bc..a1a7c8ab8b 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -135,19 +135,7 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si } const int prune_target_gb = PruneMiBtoGB(prune_target_mib); ui->prune->setText(tr("Discard blocks after verification, except most recent %1 GB (prune)").arg(prune_target_gb ? prune_target_gb : DEFAULT_PRUNE_TARGET_GB)); - m_required_space_gb = m_blockchain_size_gb + m_chain_state_size_gb; - QString storageRequiresMsg = tr("At least %1 GB of data will be stored in this directory, and it will grow over time."); - if (0 < prune_target_gb && prune_target_gb <= m_blockchain_size_gb) { - m_required_space_gb = prune_target_gb + m_chain_state_size_gb; - storageRequiresMsg = tr("Approximately %1 GB of data will be stored in this directory."); - } - ui->lblExplanation3->setVisible(prune_target_gb > 0); - ui->sizeWarningLabel->setText( - tr("%1 will download and store a copy of the Bitcoin block chain.").arg(PACKAGE_NAME) + " " + - storageRequiresMsg.arg(m_required_space_gb) + " " + - tr("The wallet will also be stored in this directory.") - ); - this->adjustSize(); + UpdatePruneLabels(prune_target_gb); startThread(); } @@ -341,3 +329,20 @@ QString Intro::getPathToCheck() mutex.unlock(); return retval; } + +void Intro::UpdatePruneLabels(int64_t prune_target_gb) +{ + m_required_space_gb = m_blockchain_size_gb + m_chain_state_size_gb; + QString storageRequiresMsg = tr("At least %1 GB of data will be stored in this directory, and it will grow over time."); + if (0 < prune_target_gb && prune_target_gb <= m_blockchain_size_gb) { + m_required_space_gb = prune_target_gb + m_chain_state_size_gb; + storageRequiresMsg = tr("Approximately %1 GB of data will be stored in this directory."); + } + ui->lblExplanation3->setVisible(prune_target_gb > 0); + ui->sizeWarningLabel->setText( + tr("%1 will download and store a copy of the Bitcoin block chain.").arg(PACKAGE_NAME) + " " + + storageRequiresMsg.arg(m_required_space_gb) + " " + + tr("The wallet will also be stored in this directory.") + ); + this->adjustSize(); +} diff --git a/src/qt/intro.h b/src/qt/intro.h index 157b33b456..b4fd390006 100644 --- a/src/qt/intro.h +++ b/src/qt/intro.h @@ -75,6 +75,7 @@ private: void startThread(); void checkPath(const QString &dataDir); QString getPathToCheck(); + void UpdatePruneLabels(int64_t prune_target_gb); friend class FreespaceChecker; }; |