-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Implement -min option to start minimized #679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -170,7 +170,15 @@ int main(int argc, char *argv[]) | |||
window.setClientModel(&clientModel); | |||
window.setWalletModel(&walletModel); | |||
|
|||
window.show(); | |||
// If -min option passed, start window minimized. | |||
if(mapArgs.count("-min")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (GetBoolArg("-min")) ... would be more consistent with other boolean args (otherwise -min=0 is interpreted as true).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
Updated to use GetBoolArg |
Nice feature, ACK |
ACK |
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. |
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? |
|
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 |
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.