Changeset View
Changeset View
Standalone View
Standalone View
src/qt/optionsdialog.cpp
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | void OptionsDialog::setModel(OptionsModel *_model) { | ||||
this->model = _model; | this->model = _model; | ||||
if (_model) { | if (_model) { | ||||
/* check if client restart is needed and show persistent message */ | /* check if client restart is needed and show persistent message */ | ||||
if (_model->isRestartRequired()) { | if (_model->isRestartRequired()) { | ||||
showRestartWarning(true); | showRestartWarning(true); | ||||
} | } | ||||
// Prune values are in GB to be consistent with intro.cpp | |||||
static constexpr uint64_t nMinDiskSpace = | |||||
(MIN_DISK_SPACE_FOR_BLOCK_FILES / GB_BYTES) + | |||||
(MIN_DISK_SPACE_FOR_BLOCK_FILES % GB_BYTES) | |||||
? 1 | |||||
: 0; | |||||
ui->pruneSize->setRange(nMinDiskSpace, std::numeric_limits<int>::max()); | |||||
QString strLabel = _model->getOverriddenByCommandLine(); | QString strLabel = _model->getOverriddenByCommandLine(); | ||||
if (strLabel.isEmpty()) { | if (strLabel.isEmpty()) { | ||||
strLabel = tr("none"); | strLabel = tr("none"); | ||||
} | } | ||||
ui->overriddenByCommandLineLabel->setText(strLabel); | ui->overriddenByCommandLineLabel->setText(strLabel); | ||||
mapper->setModel(_model); | mapper->setModel(_model); | ||||
setMapper(); | setMapper(); | ||||
mapper->toFirst(); | mapper->toFirst(); | ||||
updateDefaultProxyNets(); | updateDefaultProxyNets(); | ||||
// Prune values are in GB to be consistent with intro.cpp | |||||
static constexpr uint64_t nMinDiskSpace = | |||||
(MIN_DISK_SPACE_FOR_BLOCK_FILES / GB_BYTES) + | |||||
(MIN_DISK_SPACE_FOR_BLOCK_FILES % GB_BYTES) | |||||
? 1 | |||||
: 0; | |||||
ui->pruneSize->setRange(nMinDiskSpace, | |||||
_model->node().getAssumedBlockchainSize()); | |||||
} | } | ||||
/* warn when one of the following settings changes by user action (placed | /* warn when one of the following settings changes by user action (placed | ||||
* here so init via mapper doesn't trigger them) */ | * here so init via mapper doesn't trigger them) */ | ||||
/* Main */ | /* Main */ | ||||
connect(ui->prune, &QCheckBox::clicked, this, | connect(ui->prune, &QCheckBox::clicked, this, | ||||
&OptionsDialog::showRestartWarning); | &OptionsDialog::showRestartWarning); | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |