Implement -min option to start minimized #679

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:cmdline_minimize changing 1 files +10 −2
  1. laanwj commented at 5:13 pm on December 3, 2011: member
    The -min command line option, according to the help text, is supposed to start bitcoin minimized. This pull request implements this functionality again. See issue #671.
  2. Implement -min option to start minimized 7915370cb9
  3. in src/qt/bitcoin.cpp: in 6e8327b5b8 outdated
    169@@ -170,7 +170,15 @@ int main(int argc, char *argv[])
    170                 window.setClientModel(&clientModel);
    171                 window.setWalletModel(&walletModel);
    172 
    173-                window.show();
    174+                // If -min option passed, start window minimized.
    175+                if(mapArgs.count("-min"))
    


    gavinandresen commented at 8:31 pm on December 3, 2011:
    if (GetBoolArg("-min")) … would be more consistent with other boolean args (otherwise -min=0 is interpreted as true).

    laanwj commented at 8:25 am on December 4, 2011:
    Agreed
  4. laanwj commented at 9:04 am on December 4, 2011: member
    Updated to use GetBoolArg
  5. TheBlueMatt commented at 7:44 pm on December 4, 2011: member
    Nice feature, ACK
  6. gavinandresen commented at 1:54 am on December 5, 2011: contributor
    ACK
  7. gavinandresen referenced this in commit 8848a70ba1 on Dec 5, 2011
  8. gavinandresen merged this on Dec 5, 2011
  9. gavinandresen closed this on Dec 5, 2011

  10. runeksvendsen commented at 1:46 am on December 9, 2011: contributor

    Thanks for writing this patch laanwj!

    I did some testing, and it works fine for me unless I use the option “Minimize to the tray instead of the taskbar”. If this option is on, then I am not able to get the GUI back to an unminimized state after I start it. This is only the case when the program is started initially. If this setting is ON, and the program is started with the -min option, I can’t get it back from the taskbar; nothing happens when I click the icon. If this setting is OFF, and the program is started with the -min option, it works fine, even if this setting is turned ON after starting the program.

  11. runeksvendsen commented at 2:23 am on December 9, 2011: contributor

    It would be nice if the splash screen wasn’t shown when the -min option is specified. I tried writing a patch, but got stuck when I found out that I can’t use GetBoolArg to decide whether or not to show the splash screen, since at the point in the code where the splash screen is shown AppInit2 hasn’t been run yet, and it’s in AppInit2 that the variable (mapArgs) needed for GetBoolArg to function is populated with data.

    What could be done about this? Should we be parsing argv directly, or is there a neater trick?

  12. laanwj commented at 9:11 am on December 9, 2011: member
    1. yes, currently it does not take into account “minimize to the tray” because this is not a Qt feature, we’d need to override BitcoinGUI::showMinimized to take this into account

    2. I think a neat way would be to put basic argument parsing (ParseParameters) to beginning of main(), after Qt had its shot at the arguments with QApplication() … Could just put a #ifndef QT_GUI around it in init.cpp to make sure it is not done twice. This is also useful if we want to provide an argument to override the language (#678).

  13. runeksvendsen commented at 6:40 pm on December 9, 2011: contributor

    I see. I guess 1) will have to wait some time then. Maybe we should ignore the “minimize to tray”-setting when the “-min” option is specified?

    I have implemented 2) in pull request #690

  14. coblee referenced this in commit d2b231a5aa on Jul 17, 2012
  15. laanwj deleted the branch on Apr 9, 2014
  16. jpentland referenced this in commit 93279e7944 on Feb 7, 2016
  17. laanwj referenced this in commit b586bbd558 on Nov 6, 2019
  18. laanwj referenced this in commit 97b66d34eb on Nov 7, 2019
  19. laanwj referenced this in commit e9c85bb139 on Nov 7, 2019
  20. laanwj referenced this in commit c92f7af618 on Nov 7, 2019
  21. laanwj referenced this in commit 656712fe94 on Dec 9, 2019
  22. laanwj referenced this in commit 4abd92d5c4 on Dec 12, 2019
  23. laanwj referenced this in commit 89c8fe5189 on Jan 2, 2020
  24. sipa referenced this in commit de659898b6 on Jan 21, 2020
  25. sipa referenced this in commit 36362dfb90 on Jan 23, 2020
  26. laanwj referenced this in commit 66480821b3 on Jan 28, 2020
  27. jnewbery referenced this in commit 85e7d06351 on Mar 17, 2020
  28. sipa referenced this in commit 4977ac14d3 on Mar 18, 2020
  29. sipa referenced this in commit 5bf7fb5baa on Mar 18, 2020
  30. sipa referenced this in commit fb2a05e468 on Mar 19, 2020
  31. sipa referenced this in commit 497fad6f09 on Mar 21, 2020
  32. sipa referenced this in commit eae016f117 on Mar 22, 2020
  33. sipa referenced this in commit 4e37a7c2cb on Mar 27, 2020
  34. jnewbery referenced this in commit 9696dea839 on Apr 16, 2020
  35. jnewbery referenced this in commit a541fd0e87 on Apr 19, 2020
  36. sipa referenced this in commit c308759ea5 on Apr 19, 2020
  37. sipa referenced this in commit 4eaec32f1c on May 2, 2020
  38. sipa referenced this in commit ef7117193c on May 22, 2020
  39. sipa referenced this in commit 67f232b5d8 on Jun 9, 2020
  40. stackman27 referenced this in commit 78cde6f8c7 on Jun 26, 2020
  41. backpacker69 referenced this in commit 9a4d4e59a3 on Mar 28, 2021
  42. 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: 2024-10-05 07:12 UTC

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