aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.h
AgeCommit message (Collapse)Author
2023-07-21GUI: OptionsDialog: Replace verbose two-option font selector with simple ↵Luke Dashjr
combobox with Custom... choice
2023-07-21GUI: Use FontChoice type in OptionsModel settings abstractionLuke Dashjr
2023-07-21GUI: Load custom FontForMoney from QSettingsLuke Dashjr
2023-07-21GUI: Add possibility for an explicit QFont for FontForMoney in OptionsModelLuke Dashjr
2023-07-21GUI: Move "embedded font or not" decision into new ↵Luke Dashjr
OptionsModel::getFontForMoney method
2023-02-17Merge bitcoin/bitcoin#26889: refactor: wallet, remove global 'ArgsManager' ↵Andrew Chow
dependency 52f4d567d69425dfd514489079db80483024a80d refactor: remove <util/system.h> include from wallet.h (furszy) 6c9b342c306b9e17024762c4ba8f1c64e9810ee2 refactor: wallet, remove global 'ArgsManager' access (furszy) d8f5fc446216258a68e256076c889ec23471855f wallet: set '-walletnotify' script instead of access global args manager (furszy) 3477a28dd3b4bc6c1993554c5ce589d69fa86070 wallet: set keypool_size instead of access global args manager (furszy) Pull request description: Structurally, the wallet class shouldn't access the global `ArgsManager` class, its internal behavior shouldn't be coupled to a global command line args parsing object. So this PR migrates the only two places where we depend on it: (1) the keypool size, and (2) the "-walletnotify" script. And cleans up the, now unneeded, wallet `ArgsManager` ref member. Extra note: In the process of removing the args ref member, discovered and fixed files that were invalidly depending on the wallet header including `util/system.h`. ACKs for top commit: achow101: ACK 52f4d567d69425dfd514489079db80483024a80d TheCharlatan: Re-ACK 52f4d567d69425dfd514489079db80483024a80d hebasto: re-ACK 52f4d567d69425dfd514489079db80483024a80d Tree-SHA512: 0cffd99b4dd4864bf618aa45aeaabbef2b6441d27b6dbb03489c4e013330877682ff17b418d07aa25fbe1040bdf2c67d7559bdeb84128c5437bf0e6247719016
2023-02-15refactor: remove <util/system.h> include from wallet.hfurszy
Since we no longer store a ref to the global `ArgsManager` inside the wallet, we can move the util/system.h include to the cpp. This dependency removal opened a can of worms, as few other places were, invalidly, depending on the wallet's header including it.
2023-02-15Merge bitcoin-core/gui#603: Add settings.json prune-prev, proxy-prev, ↵Hennadii Stepanov
onion-prev settings 9d3127b11e34131409dab7c08bde5b444d90b2cb Add settings.json prune-prev, proxy-prev, onion-prev settings (Ryan Ofsky) Pull request description: With #602, if proxy and pruning settings are disabled in the GUI and the GUI is restarted, proxy and prune values are not stored anywhere. So if these settings are enabled in the future, default values will be shown, not previous values. This PR stores previous values so they will preserved across restarts. I'm not sure I like this behavior because showing default values seems simpler and safer to me. Previous values may just have been set temporarily and may have never actually worked, and it adds some code complexity to store them. This PR is one way of resolving #596. Other solutions are possible and could be implemented as alternatives. ACKs for top commit: hebasto: ACK 9d3127b11e34131409dab7c08bde5b444d90b2cb, tested on Ubuntu 22.04. vasild: ACK 9d3127b11e34131409dab7c08bde5b444d90b2cb jarolrod: tACK 9d3127b11e34131409dab7c08bde5b444d90b2cb Tree-SHA512: 1778d1819443490c880cfd5c1711d9c5ac75ea3ee8440e2f0ced81d293247163a78ae8aba6027215110aec6533bd7dc6472aeead6796bfbd51bf2354e28f24a9
2023-01-23qt: Persist Mask Values optionAndrew Chow
The mask values option is memory only. If a user has enabled this option, it's reasonable to expect that they would want to have it enabled on the next start.
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-09-21Add settings.json prune-prev, proxy-prev, onion-prev settingsRyan Ofsky
This provides a way for the GUI settings dialog box to retain previous pruning and proxy settings when they are disabled, as requested by vasild: https://github.com/bitcoin/bitcoin/pull/15936#pullrequestreview-937685759 https://github.com/bitcoin/bitcoin/pull/15936#discussion_r850568749 https://github.com/bitcoin/bitcoin/pull/15936#discussion_r852998379 Importantly, while this PR changes the settings.json format, it changes it in a fully backwards compatible way, so previous versious of bitcoind and bitcoin-qt will correctly interpret prune, proxy, and onion settins written by new versions of bitcoin-qt.
2022-05-26Migrate -prune setting from QSettings to settings.jsonRyan Ofsky
2022-05-26Migrate -proxy and -onion settings from QSettings to settings.jsonRyan Ofsky
2022-05-26Migrate -dbcache setting from QSettings to settings.jsonRyan Ofsky
This is just the first of multiple settings that will be stored in the bitcoin persistent setting file and shared with bitcoind, instead of being stored as Qt settings backed by the windows registry or platform specific config files which are ignored by bitcoind. Co-Authored-By: furszy <matiasfurszyfer@protonmail.com>
2022-05-24Merge bitcoin-core/gui#601: refactor: Pass interfaces::Node references to ↵Hennadii Stepanov
OptionsModel constructor 31122aa979c4c9a40e276cfc44243420c367ba4f refactor: Pass interfaces::Node references to OptionsModel constructor (Ryan Ofsky) Pull request description: Giving OptionsModel access to the node interface is needed as part of #602 to get bitcoind and bitcoin-qt to use the same settings instead of different settings. It has been split off from #602 to simplify that PR. Previously these commits were part of bitcoin/bitcoin#15936 and also had some review discussion there. ACKs for top commit: promag: Code review ACK 31122aa979c4c9a40e276cfc44243420c367ba4f. furszy: Code ACK 31122aa9 jarolrod: ACK 31122aa979c4c9a40e276cfc44243420c367ba4f Tree-SHA512: b8529322fd7ba97e19864129e6cf5f9acc58c124f2e5a7c50aca15772c8549de3c24e8b0c27e8cf2c06fd26529e9cdb898b0788a1de3cbfdfbdd3f85c9f0fe69
2022-05-19refactor: Pass interfaces::Node references to OptionsModel constructorRyan Ofsky
Will allow OptionsModel to read/write settings to the node settings.json file and share settings with the node, instead of storing them externally in QSettings. Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
2022-05-19refactor: Add OptionsModel getOption/setOption methodsRyan Ofsky
Easiest to review ignoring whitespace.
2022-02-22qt: Skip displayUnitChanged signal if unit is not actually changedHennadii Stepanov
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2022-02-22qt, refactor: Make BitcoinUnits::Unit a scoped enumHennadii Stepanov
2022-02-22qt: Use QVariant instead of int for BitcoinUnit in QSettingsHennadii Stepanov
This change improves type safety.
2022-01-09Merge bitcoin-core/gui#441: Add Create Unsigned button to SendConfirmationDialogHennadii Stepanov
742918c8ef353993a07c060f476a160e8272a9ef qt: hide Create Unsigned button behind an expert mode option (Andrew Chow) 5c3b800acd3ceb75ff6bbac8d0e2e1aaa95b0728 qt: Add Create Unsigned button to SendConfirmationDialog (Andrew Chow) Pull request description: Instead of having different buttons or changing button behavior for making a PSBT, just have SendConfirmationDialog return whether the user wants a PSBT or a broadcasted transaction. Since this dialog is used by both the bumpFeeAction and the SendCoinsDialog, changes to both to support the different behavior is needed. They will check the return value of the SendConfirmationDialog for whether a PSBT needs to be created instead of checking whether private keys are disabled. Strings used in this dialog are being slightly modified to work with both private keys enabled and disabled wallets. Moved from https://github.com/bitcoin/bitcoin/pull/18789 ACKs for top commit: jarolrod: ACK 742918c ryanofsky: Code review ACK 742918c8ef353993a07c060f476a160e8272a9ef. Just suggested changes since last review. Looks great! hebasto: ACK 742918c8ef353993a07c060f476a160e8272a9ef, tested on Linux Mint 20.2 (Qt 5.12.8). Tree-SHA512: dd29f4364c7b4f15befe8fe63257b26187918786b005e0f8336183270b1a162680b93f6ced60f0285c6e607c084cc0d24950fc68a8f9c056521ede614041be66
2021-12-30scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: * 2020: fa0074e2d82928016a43ca408717154a1c70a4db * 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2021-10-08qt: hide Create Unsigned button behind an expert mode optionAndrew Chow
2021-09-30[MOVEONLY] consensus: move amount.h into consensusfanquake
Move amount.h to consensus/amount.h. Renames, adds missing and removes uneeded includes.
2021-09-16gui: add RPC settingSjors Provoost
2021-08-11qt: Add SubFeeFromAmount optionPrateek Sancheti
2021-05-27gui: add external signer path to options dialogSjors Provoost
2021-02-21gui: Add monospaced font settingsHennadii Stepanov
2021-01-07net: Add -natpmp command line optionHennadii Stepanov
2020-11-15gui: Replace "Hide tray icon" option with positive "Show tray icon" oneHennadii Stepanov
This change makes easier both (1) using this option, and (2) reasoning about the code.
2020-08-26gui: Replace interface::Node references with pointersRussell Yanofsky
No change in behavior. Replacing references with pointers allows Node interface creation to be delayed until later during gui startup next commit to support implementing -ipcconnect option
2020-06-22refactor: Use uint16_t instead of unsigned shortAaron Hook
removed trailing whitespace to make linter happy
2020-05-08refactor: Use override for non-final overridersHennadii Stepanov
2020-01-27Merge #17453: gui: Fix intro dialog labels when the prune button is toggledJonas Schnelli
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 0.19.0.1 the intro dialog with prune enabled (checkbox "Discard blocks..." is checked) provides a user with wrong info about the required disk space: ![DeepinScreenshot_bitcoin-qt_20191208112228](https://user-images.githubusercontent.com/32963518/70387510-8daab400-19ae-11ea-9338-29add9c31118.png) 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. ACKs for top commit: emilengler: ACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 Sjors: tACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 ryanofsky: Code review ACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26. It seems like there are a few visible changes here: jonasschnelli: utACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 Tree-SHA512: fa0bbdcfafde97d7906cda066cbd4608b936a71cae1b4cda3ee3aa2eed3a9795f279f14c6b1b4997278e094db891c7d3bb695368ba0882347aa42165a86e5172
2020-01-15scripted-diff: Bump copyright of files changed in 2020MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-01-08util: Add PruneGBtoMiB() functionHennadii Stepanov
This commit does not change behavior.
2020-01-08util: Add PruneMiBtoGB() functionHennadii Stepanov
Now the text of prune QCheckBox shows the space in GB instead of thousands MiB, which is consistent with other parts of the GUI.
2020-01-08Merge #17696: qt: Force set nPruneSize in QSettings after the intro dialogfanquake
af112ab62895b145660f4cd7ff842e9cfea2a530 qt: Rename SetPrune() to InitializePruneSetting() (Hennadii Stepanov) b0bfbe50282877a1eee87118902901a280d6656d refactor: Drop `bool force' parameter (Hennadii Stepanov) 68c9bbe9bc91f882404556998666b1b5acea60e4 qt: Force set nPruneSize in QSettings after intro (Hennadii Stepanov) a82bd8fa5708c16d1db3edc4e82d70788eb5af19 util: Replace magics with DEFAULT_PRUNE_TARGET_GB (Hennadii Stepanov) Pull request description: On master (5622d8f3156a293e61d0964c33d4b21d8c9fd5e0), having `QSettings` set already ``` $ grep nPruneSize ~/.config/Bitcoin/Bitcoin-Qt-testnet.conf nPruneSize=6 ``` enabling prune option in the intro dialog ``` $ ./src/qt/bitcoin-qt -choosedatadir -testnet ``` ![DeepinScreenshot_select-area_20191208120425](https://user-images.githubusercontent.com/32963518/70388183-eed68580-19b6-11ea-9aa1-f9ad9aaa68a6.png) has no effect: ``` $ grep Prune ~/.bitcoin/testnet3/debug.log 2019-12-08T10:04:41Z Prune configured to target 5722 MiB on disk for block and undo files. ``` --- With this PR: ``` $ grep Prune ~/.bitcoin/testnet3/debug.log 2019-12-08T10:20:35Z Prune configured to target 1907 MiB on disk for block and undo files. ``` This PR has been split of #17453 (the first two commits) as it fixes an orthogonal bug. Refs: - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r345424240 - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r350960201 ACKs for top commit: Sjors: Code review re-ACK af112ab62895b145660f4cd7ff842e9cfea2a530 ryanofsky: Code review ACK af112ab62895b145660f4cd7ff842e9cfea2a530. Just suggested changes since last review (thanks!) promag: Tested ACK af112ab62895b145660f4cd7ff842e9cfea2a530. Latest suggestions and changes look good to me. Tree-SHA512: 8ddad34b30dcc2cdcad6678ba8a0b36fa176e4e3465862ef6eee9be0f98d8146705138c9c7995dd8c0990af41078ca743fef1a90ed9240081f052f32ddec72b9
2020-01-08qt: Force set nPruneSize in QSettings after introHennadii Stepanov
If QSettings is set already, it is required to force set nPruneSize after the intro dialog.
2019-12-30scripted-diff: Bump copyright of files changed in 2019MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2019-10-24Remove BIP70 Supportfanquake
2019-08-24[gui] add explicit prune setterSjors Provoost
This makes it possible to enable pruning after the OptionsModel has been initialized and reset.
2019-01-13Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)practicalswift
Qt-only changes.
2018-07-27Update copyright headers to 2018DrahtBot
2018-05-15[qt] OptionsDialog: add prune settingSjors Provoost
2018-04-07scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky
Rename `interface` to `interfaces` Build failure reported by Chun Kuan Lee <ken2812221@gmail.com> https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756 -BEGIN VERIFY SCRIPT- git mv src/interface src/interfaces ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; } ren interface/ interfaces/ ren interface:: interfaces:: ren BITCOIN_INTERFACE_ BITCOIN_INTERFACES_ ren "namespace interface" "namespace interfaces" -END VERIFY SCRIPT-
2018-04-04Remove direct bitcoin calls from qt/optionsdialog.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/optionsmodel.cppRussell Yanofsky
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-12-07gui: Fix proxy setting options dialog crashWladimir J. van der Laan
This fixes a crash bug when opening the options dialog. - Check the return value of split() to avoid segmentation faults due to out of bounds when the user manages to enter invalid proxy settings. This is reported resonably often. - Move the default proxy/port to a constant instead of hardcoding magic values. - Factor out some common code. - Revert #11448 because this proves a more robust replacement, it is no longer necessary and didn't generally solve the issue. No attempt is made to do full sanity checking on the proxy, so it can still be rejected by the core with an InitError message.