Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 480 Lines • ▼ Show 20 Lines | for (auto &wallet : wallets) { | ||||
std::move(wallet), m_node, platformStyle, *cwallet++, optionsModel); | std::move(wallet), m_node, platformStyle, *cwallet++, optionsModel); | ||||
window->addWallet(walletModel); | window->addWallet(walletModel); | ||||
if (fFirstWallet) { | if (fFirstWallet) { | ||||
window->setCurrentWallet(walletModel->getWalletName()); | window->setCurrentWallet(walletModel->getWalletName()); | ||||
fFirstWallet = false; | fFirstWallet = false; | ||||
} | } | ||||
connect(walletModel, | connect( | ||||
SIGNAL(coinsSent(CWallet *, SendCoinsRecipient, QByteArray)), | walletModel, | ||||
SIGNAL(coinsSent(WalletModel *, SendCoinsRecipient, QByteArray)), | |||||
paymentServer, | paymentServer, | ||||
SLOT(fetchPaymentACK(CWallet *, const SendCoinsRecipient &, | SLOT(fetchPaymentACK(WalletModel *, const SendCoinsRecipient &, | ||||
QByteArray))); | QByteArray))); | ||||
m_wallet_models.push_back(walletModel); | m_wallet_models.push_back(walletModel); | ||||
} | } | ||||
#endif | #endif | ||||
// If -min option passed, start window minimized. | // If -min option passed, start window minimized. | ||||
if (gArgs.GetBoolArg("-min", false)) { | if (gArgs.GetBoolArg("-min", false)) { | ||||
window->showMinimized(); | window->showMinimized(); | ||||
▲ Show 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | try { | ||||
node->selectParams(gArgs.GetChainName()); | node->selectParams(gArgs.GetChainName()); | ||||
} catch (std::exception &e) { | } catch (std::exception &e) { | ||||
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), | QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), | ||||
QObject::tr("Error: %1").arg(e.what())); | QObject::tr("Error: %1").arg(e.what())); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
// Parse URIs on command line -- this can affect Params() | // Parse URIs on command line -- this can affect Params() | ||||
PaymentServer::ipcParseCommandLine(argc, argv); | PaymentServer::ipcParseCommandLine(*node, argc, argv); | ||||
#endif | #endif | ||||
QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate( | QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate( | ||||
QString::fromStdString(Params().NetworkIDString()))); | QString::fromStdString(Params().NetworkIDString()))); | ||||
assert(!networkStyle.isNull()); | assert(!networkStyle.isNull()); | ||||
// Allow for separate UI settings for testnets | // Allow for separate UI settings for testnets | ||||
QApplication::setApplicationName(networkStyle->getAppName()); | QApplication::setApplicationName(networkStyle->getAppName()); | ||||
// Re-initialize translations after changing application name (language in | // Re-initialize translations after changing application name (language in | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |