- a click on "Reset Options" sets all options to the default values by removing all stored settings (QSettings), loading the defaults and saving them as the new settings
- before the reset is executed the user is presented a confirmation dialog
- special casing was needed for StartAtStartup
Bitcoin-Qt: add a Reset button to the options dialog #1685
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:Qt_add_options_reset changing 5 files +79 −2-
Diapolo commented at 2:27 PM on August 18, 2012: none
-
BitcoinPullTester commented at 5:42 PM on August 18, 2012: none
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/3ba81511f1d9409c85ec00a67fa7d5ac3d21a806 for binaries and test log.
-
in src/qt/optionsmodel.cpp:None in 3ba81511f1 outdated
184 | @@ -167,7 +185,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const 185 | case DisplayAddresses: 186 | return QVariant(bDisplayAddresses); 187 | case DetachDatabases: 188 | - return QVariant(bitdb.GetDetach()); 189 | + return settings.value("detachDB", false);
laanwj commented at 10:44 AM on August 22, 2012:Didn't we agree last time that the preferences dialog shows the settings currently active. Thus, as overridden by command line options etc? In that case, this change is not valid.
Diapolo commented at 10:51 AM on August 22, 2012:With the original code, there is no default, when doing a reset, as the detach DB checkbox always reflects the current state. This seemed like the easiest way to fix that. Have you got a better idea?
laanwj commented at 5:18 AM on August 24, 2012:Yes I like the general idea of a reset "to factory settings" button. I don't agree with this change though as it makes detach different from the other core settings.
Diapolo commented at 6:04 AM on August 24, 2012:I can revert this, but please consider the following:
This patch has the following behaviour: 1. 1.1. enable
Detach Databases at Shutdownin settings -> Apply and close 1.2. clickReset->Detach Databases at Shutdownget's disabled 2. 1.1. enableDetach Databases at Shutdownin settings -> Apply and close 1.2. disableDetach Databases at Shutdownin settings -> Apply and close 1.3. clickReset->Detach Databases at Shutdownstays disabledWith current code: 1. 1.1. enable
Detach Databases at Shutdownin settings -> Apply and close 1.2. clickReset->Detach Databases at Shutdownstays enabled 2. 1.1. enableDetach Databases at Shutdownin settings -> Apply and close 1.2. disableDetach Databases at Shutdownin settings -> Apply and close 1.3. clickReset->Detach Databases at Shutdownstays disabledSo current code is special and IMHO a user expects it to be the way after this patch, no?
BitcoinPullTester commented at 6:32 AM on November 1, 2012: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/35ff85be9d53d082c4748472dd87fd98572f8798 for binaries and test log.
Diapolo commented at 10:39 PM on November 9, 2012: noneUpdated and removed special casing for detachDB as that was removed entirely.
luke-jr commented at 5:12 AM on November 13, 2012: memberDoes this correctly handle the Cancel case? That is, if I Reset and Cancel, no changes should be made (and making changes should require OK/Apply).
Diapolo commented at 7:04 AM on November 13, 2012: noneNo, when you use reset button, this is a non-reversible action. It's IMO not worth the trouble (perhaps not even possible the way this is working), but I could add a warning message where you need to confirm the process, would this be sufficient then?
Making changes DOES already require OK/Apply.
BitcoinPullTester commented at 7:09 PM on November 27, 2012: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/92ffc1b5a9dbebc281da38782d99fb357ba77f15 for binaries and test log.
sipa commented at 12:44 AM on January 5, 2013: memberWhat is the status on this?
luke-jr commented at 1:58 AM on January 5, 2013: memberI still think it's a usability bug for it to conflict with the Cancel action, but I don't really care enough to argue over it.
5fb445b49eBitcoin-Qt: add a Reset button to the options dialog
- a click on "Reset Options" sets all options to the default values by removing all stored settings (QSettings), loading the defaults and saving them as the new settings - before the reset is executed the user is presented a confirmation dialog - special casing was needed for StartAtStartup
Diapolo commented at 12:53 PM on January 5, 2013: noneUpdated to include a confirmation dialog before executing the reset.
laanwj commented at 3:36 PM on January 5, 2013: memberMuch better with confirmation dialog, ACK
laanwj referenced this in commit 744adb2e61 on Jan 5, 2013laanwj merged this on Jan 5, 2013laanwj closed this on Jan 5, 2013laudney referenced this in commit 914a28a333 on Mar 19, 2014suprnurd referenced this in commit 4cac044d95 on Dec 5, 2017DrahtBot locked this on Sep 8, 2021Contributors
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC
More mirrored repositories can be found on mirror.b10c.me