mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-17 08:06:59 +01:00
gui: make '-min' minimize wallet loading dialog
When '-min' is enabled, no loading dialog should be presented on screen during startup.
This commit is contained in:
@@ -407,18 +407,21 @@ void BitcoinApplication::initializeResult(bool success, interfaces::BlockAndHead
|
||||
qInfo() << "Platform customization:" << platformStyle->getName();
|
||||
clientModel = new ClientModel(node(), optionsModel);
|
||||
window->setClientModel(clientModel, &tip_info);
|
||||
|
||||
// If '-min' option passed, start window minimized (iconified) or minimized to tray
|
||||
bool start_minimized = gArgs.GetBoolArg("-min", false);
|
||||
#ifdef ENABLE_WALLET
|
||||
if (WalletModel::isWalletEnabled()) {
|
||||
m_wallet_controller = new WalletController(*clientModel, platformStyle, this);
|
||||
window->setWalletController(m_wallet_controller);
|
||||
window->setWalletController(m_wallet_controller, /*show_loading_minimized=*/start_minimized);
|
||||
if (paymentServer) {
|
||||
paymentServer->setOptionsModel(optionsModel);
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
// If -min option passed, start window minimized (iconified) or minimized to tray
|
||||
if (!gArgs.GetBoolArg("-min", false)) {
|
||||
// Show or minimize window
|
||||
if (!start_minimized) {
|
||||
window->show();
|
||||
} else if (clientModel->getOptionsModel()->getMinimizeToTray() && window->hasTrayIcon()) {
|
||||
// do nothing as the window is managed by the tray icon
|
||||
|
||||
Reference in New Issue
Block a user