Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | |||||
void BitcoinApplication::addWallet(WalletModel *walletModel) { | void BitcoinApplication::addWallet(WalletModel *walletModel) { | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
window->addWallet(walletModel); | window->addWallet(walletModel); | ||||
if (m_wallet_models.empty()) { | if (m_wallet_models.empty()) { | ||||
window->setCurrentWallet(walletModel); | window->setCurrentWallet(walletModel); | ||||
} | } | ||||
#ifdef ENABLE_BIP70 | |||||
connect(walletModel, &WalletModel::coinsSent, paymentServer, | connect(walletModel, &WalletModel::coinsSent, paymentServer, | ||||
&PaymentServer::fetchPaymentACK); | &PaymentServer::fetchPaymentACK); | ||||
#endif | |||||
connect(walletModel, &WalletModel::unload, this, | connect(walletModel, &WalletModel::unload, this, | ||||
&BitcoinApplication::removeWallet); | &BitcoinApplication::removeWallet); | ||||
m_wallet_models.push_back(walletModel); | m_wallet_models.push_back(walletModel); | ||||
#endif | #endif | ||||
} | } | ||||
void BitcoinApplication::removeWallet() { | void BitcoinApplication::removeWallet() { | ||||
Show All 15 Lines | if (!success) { | ||||
// Exit first main loop invocation. | // Exit first main loop invocation. | ||||
quit(); | quit(); | ||||
return; | return; | ||||
} | } | ||||
// Log this only after AppInitMain finishes, as then logging setup is | // Log this only after AppInitMain finishes, as then logging setup is | ||||
// guaranteed complete. | // guaranteed complete. | ||||
qWarning() << "Platform customization:" << platformStyle->getName(); | qWarning() << "Platform customization:" << platformStyle->getName(); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
#ifdef ENABLE_BIP70 | |||||
PaymentServer::LoadRootCAs(); | PaymentServer::LoadRootCAs(); | ||||
#endif | |||||
if (paymentServer) { | if (paymentServer) { | ||||
paymentServer->setOptionsModel(optionsModel); | paymentServer->setOptionsModel(optionsModel); | ||||
} | } | ||||
#endif | #endif | ||||
clientModel = new ClientModel(m_node, optionsModel); | clientModel = new ClientModel(m_node, optionsModel); | ||||
window->setClientModel(clientModel); | window->setClientModel(clientModel); | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | WId BitcoinApplication::getMainWinId() const { | ||||
if (!window) { | if (!window) { | ||||
return 0; | return 0; | ||||
} | } | ||||
return window->winId(); | return window->winId(); | ||||
} | } | ||||
static void SetupUIArgs() { | static void SetupUIArgs() { | ||||
#ifdef ENABLE_WALLET | #if defined(ENABLE_WALLET) && defined(ENABLE_BIP70) | ||||
gArgs.AddArg("-allowselfsignedrootcertificates", | gArgs.AddArg("-allowselfsignedrootcertificates", | ||||
strprintf("Allow self signed root certificates (default: %d)", | strprintf("Allow self signed root certificates (default: %d)", | ||||
DEFAULT_SELFSIGNED_ROOTCERTS), | DEFAULT_SELFSIGNED_ROOTCERTS), | ||||
true, OptionsCategory::GUI); | true, OptionsCategory::GUI); | ||||
#endif | #endif | ||||
gArgs.AddArg("-choosedatadir", | gArgs.AddArg("-choosedatadir", | ||||
strprintf("Choose data directory on startup (default: %d)", | strprintf("Choose data directory on startup (default: %d)", | ||||
DEFAULT_CHOOSE_DATADIR), | DEFAULT_CHOOSE_DATADIR), | ||||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |