[backport#17453] gui: Fix intro dialog labels when the prune button is toggled


[backport#17453] gui: Fix intro dialog labels when the prune button is toggled

4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 gui: Make Intro consistent with prune checkbox (Hennadii Stepanov)
4824a7d36cf47e766865e0fefe952ec860eb82dd gui: Add Intro::UpdateFreeSpaceLabel() (Hennadii Stepanov)
daa3f3fa9071a229275dd6a1b8445237ddc3fa97 refactor: Add Intro::UpdatePruneLabels() (Hennadii Stepanov)
e4caa82a03df5c6a6d5d29f34ab006d732c6dac1 refactor: Replace static variable with data member (Hennadii Stepanov)
2bede28cd9ec638d8bb32c187ccf12d89345218e util: Add PruneGBtoMiB() function (Hennadii Stepanov)
e35e4b2ba052c9a533626286026dbe0a2d546c5b util: Add PruneMiBtoGB() function (Hennadii Stepanov)

Pull request description:

On master (a6f6333ba253cda83221ee529810cacf930e413f) and on the intro dialog with prune enabled (checkbox "Discard blocks..." is checked) provides a user with wrong info about the required disk space:


Also the paragraph "If you have chosen to limit..." is missed.


With this PR when prune checkbox is toggled, the related text labels and the amount of required space shown are updated (previously they were only updated when the data directory was updated):
![Screenshot from 2019-12-08 11-34-53](https://user-images.githubusercontent.com/32963518/70387542-eed28780-19ae-11ea-9565-49d8a64b2f33.png)


This PR is an alternative to #17035.

**ryanofsky**'s [suggestion](https://github.com/bitcoin/bitcoin/pull/17035#discussion_r337594268) also has been implemented.

Backport of Core PR17453

Depends on D8913

Test Plan:

ninja all check check-functional
./src/qt/bitcoin-qt -choosedatadir

check that correct information is provided, whether prune checkbox is ticked or not

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D8914


Jonas Schnelli <dev@jonasschnelli.ch>Authored on Jan 27 2020, 17:15
majcostaCommitted on Jan 14 2021, 15:37
majcostaPushed on Jan 14 2021, 15:37
Restricted Project
Differential Revision
D8914: [backport#17453] gui: Fix intro dialog labels when the prune button is toggled
rABCfc8c7fd5b1fa: [backport#15874] Resolve the qt/guiutil <-> qt/optionsmodel CD