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
  1. Diapolo commented at 2:27 PM on August 18, 2012: none
    • 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
  2. 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.

  3. 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?


    Diapolo commented at 9:50 PM on August 23, 2012:

    @laanwj What do you say? Is the general idea for that reset button a good one and what about the detach thing?


    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 Shutdown in settings -> Apply and close 1.2. click Reset -> Detach Databases at Shutdown get's disabled 2. 1.1. enable Detach Databases at Shutdown in settings -> Apply and close 1.2. disable Detach Databases at Shutdown in settings -> Apply and close 1.3. click Reset -> Detach Databases at Shutdown stays disabled

    With current code: 1. 1.1. enable Detach Databases at Shutdown in settings -> Apply and close 1.2. click Reset -> Detach Databases at Shutdown stays enabled 2. 1.1. enable Detach Databases at Shutdown in settings -> Apply and close 1.2. disable Detach Databases at Shutdown in settings -> Apply and close 1.3. click Reset -> Detach Databases at Shutdown stays disabled

    So current code is special and IMHO a user expects it to be the way after this patch, no?


    Diapolo commented at 6:55 AM on September 21, 2012:

    @laanwj Alright, as you did not respond, let me re-phrase, are there any further comments left, when I revert that single change :)?

  4. laanwj commented at 7:27 AM on September 21, 2012: member

    @Diapolo my time is pretty limited, and I haven't found time to test and look at this in further detail yet. It will be a while before 0.8.0 is released, I guess, so there's no need to hurry.

  5. Diapolo commented at 5:01 PM on October 7, 2012: none

    @laanwj I found a method to achieve what I wanted, without the need to change the detachDB stuff in OptionsModel::data().

  6. BitcoinPullTester commented at 6:32 AM on November 1, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/35ff85be9d53d082c4748472dd87fd98572f8798 for binaries and test log.

  7. Diapolo commented at 10:39 PM on November 9, 2012: none

    Updated and removed special casing for detachDB as that was removed entirely.

  8. luke-jr commented at 5:12 AM on November 13, 2012: member

    Does 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).

  9. Diapolo commented at 7:04 AM on November 13, 2012: none

    No, 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.

  10. BitcoinPullTester commented at 7:09 PM on November 27, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/92ffc1b5a9dbebc281da38782d99fb357ba77f15 for binaries and test log.

  11. sipa commented at 12:44 AM on January 5, 2013: member

    What is the status on this?

  12. Diapolo commented at 12:59 AM on January 5, 2013: none

    Neither @luke-jr nor @laanwj added further comments, but from my point of view this would be a nice little addition for 0.8.

    Edit: I tried it and still seems to work, but would of course need a little testing an feedback ;).

  13. luke-jr commented at 1:58 AM on January 5, 2013: member

    I 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.

  14. Bitcoin-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
    5fb445b49e
  15. Diapolo commented at 12:53 PM on January 5, 2013: none

    Updated to include a confirmation dialog before executing the reset.

  16. laanwj commented at 3:36 PM on January 5, 2013: member

    Much better with confirmation dialog, ACK

  17. laanwj referenced this in commit 744adb2e61 on Jan 5, 2013
  18. laanwj merged this on Jan 5, 2013
  19. laanwj closed this on Jan 5, 2013

  20. laudney referenced this in commit 914a28a333 on Mar 19, 2014
  21. suprnurd referenced this in commit 4cac044d95 on Dec 5, 2017
  22. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

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

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me