Move GetStartOnSystemStartup and SetStartOnSystemStartup to GUI code #1178

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2012_05_move_startonsystemstartup changing 7 files +155 −154
  1. laanwj commented at 4:56 PM on May 1, 2012: member

    ...as this is the logical place for them. @diapolo can you test whether this still builds on windows? I'm not sure what includes are needed for CoCreateInstance / GetModuleFileName.

  2. Diapolo commented at 4:57 PM on May 1, 2012: none

    Sure, will report back after I did the tests :).

  3. in src/qt/guiutil.cpp:None in 037eb1f370 outdated
      17 | @@ -17,6 +18,9 @@
      18 |  #include <QDesktopServices>
      19 |  #include <QThread>
      20 |  
      21 | +#include <boost/filesystem.hpp>
      22 | +#include <boost/filesystem/fstream.hpp>
      23 | +
    


    Diapolo commented at 5:10 PM on May 1, 2012:

    This needs:

    #ifdef WIN32 #include "shlwapi.h" #endif

  4. in src/qt/guiutil.cpp:None in 037eb1f370 outdated
     224 | +    return MyGetSpecialFolderPath(CSIDL_STARTUP, true) / "Bitcoin.lnk";
     225 | +}
     226 | +
     227 | +bool GetStartOnSystemStartup()
     228 | +{
     229 | +    return filesystem::exists(StartupShortcutPath());
    


    Diapolo commented at 5:10 PM on May 1, 2012:

    This needs to be:

    return boost::filesystem::exists(StartupShortcutPath());

  5. Diapolo commented at 5:12 PM on May 1, 2012: none

    Seems like a good idea to move MyGetSpecialFolderPath function from util.cpp into guiutil.cpp, too, as I currently get: guiutil.cpp:229: Fehler:'MyGetSpecialFolderPath' was not declared in this scope.

  6. Diapolo commented at 5:20 PM on May 1, 2012: none

    It seems that shlwapi.h can be removed from util.cpp after your changes.

  7. laanwj commented at 5:20 PM on May 1, 2012: member

    Thanks for the fixes.

    MyGetSpecialFolderPath cannot be moved as it's also used in GetDefaultDataDir, which should certainly stay in the core code.

    On the other hand, if we can remove the fallbacks, we could simply use the windows API function SHGetSpecialFolderPathA directly in both places and get rid of MyGetSpecialFolderPath. For now, I'll simply add it to util.h.

  8. laanwj commented at 5:26 PM on May 1, 2012: member

    Ok, updated.

  9. Diapolo commented at 8:15 PM on May 1, 2012: none

    Now compiles fine on Windows, just see above comment for guiutil.cpp :). I will have to rebase #1134 after this get's merged, but that's fine. I consider removing MyGetSpecialFolderPath() then.

  10. laanwj commented at 7:11 AM on May 5, 2012: member

    Updated to _WIN32_IE 0x0501

  11. laanwj commented at 10:29 AM on May 13, 2012: member

    Rebased

  12. Move GetStartOnSystemStartup and SetStartOnSystemStartup to GUI code 67d4cbab46
  13. laanwj referenced this in commit b07ea7c74b on May 13, 2012
  14. laanwj merged this on May 13, 2012
  15. laanwj closed this on May 13, 2012

  16. coblee referenced this in commit daa5f657d0 on Jul 17, 2012
  17. laanwj deleted the branch on Apr 9, 2014
  18. suprnurd referenced this in commit c3e5757c25 on Dec 5, 2017
  19. lateminer referenced this in commit c33f97d0b6 on Jan 22, 2019
  20. lateminer referenced this in commit d7a929c6a8 on Dec 25, 2019
  21. Bushstar referenced this in commit 897f5edba1 on Oct 21, 2020
  22. DrahtBot locked this on Sep 8, 2021
Contributors

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-13 15:16 UTC

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