Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 1,279 Lines • ▼ Show 20 Lines | bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient &recipient) { | ||||
if (walletFrame && walletFrame->handlePaymentRequest(recipient)) { | if (walletFrame && walletFrame->handlePaymentRequest(recipient)) { | ||||
showNormalIfMinimized(); | showNormalIfMinimized(); | ||||
gotoSendCoinsPage(); | gotoSendCoinsPage(); | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
void BitcoinGUI::setHDStatus(int hdEnabled) { | void BitcoinGUI::setHDStatus(bool privkeyDisabled, int hdEnabled) { | ||||
labelWalletHDStatusIcon->setPixmap( | labelWalletHDStatusIcon->setPixmap( | ||||
platformStyle | platformStyle | ||||
->SingleColorIcon(hdEnabled ? ":/icons/hd_enabled" | ->SingleColorIcon(privkeyDisabled | ||||
? ":/icons/eye" | |||||
: hdEnabled ? ":/icons/hd_enabled" | |||||
: ":/icons/hd_disabled") | : ":/icons/hd_disabled") | ||||
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); | .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); | ||||
labelWalletHDStatusIcon->setToolTip( | labelWalletHDStatusIcon->setToolTip( | ||||
hdEnabled ? tr("HD key generation is <b>enabled</b>") | privkeyDisabled | ||||
? tr("Private key <b>disabled</b>") | |||||
: hdEnabled ? tr("HD key generation is <b>enabled</b>") | |||||
: tr("HD key generation is <b>disabled</b>")); | : tr("HD key generation is <b>disabled</b>")); | ||||
// eventually disable the QLabel to set its opacity to 50% | // eventually disable the QLabel to set its opacity to 50% | ||||
labelWalletHDStatusIcon->setEnabled(hdEnabled); | labelWalletHDStatusIcon->setEnabled(hdEnabled); | ||||
} | } | ||||
void BitcoinGUI::setEncryptionStatus(int status) { | void BitcoinGUI::setEncryptionStatus(int status) { | ||||
switch (status) { | switch (status) { | ||||
case WalletModel::Unencrypted: | case WalletModel::Unencrypted: | ||||
Show All 34 Lines | if (!walletFrame) { | ||||
return; | return; | ||||
} | } | ||||
WalletView *const walletView = walletFrame->currentWalletView(); | WalletView *const walletView = walletFrame->currentWalletView(); | ||||
if (!walletView) { | if (!walletView) { | ||||
return; | return; | ||||
} | } | ||||
WalletModel *const walletModel = walletView->getWalletModel(); | WalletModel *const walletModel = walletView->getWalletModel(); | ||||
setEncryptionStatus(walletModel->getEncryptionStatus()); | setEncryptionStatus(walletModel->getEncryptionStatus()); | ||||
setHDStatus(walletModel->wallet().hdEnabled()); | setHDStatus(walletModel->privateKeysDisabled(), | ||||
walletModel->wallet().hdEnabled()); | |||||
} | } | ||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
void BitcoinGUI::updateProxyIcon() { | void BitcoinGUI::updateProxyIcon() { | ||||
std::string ip_port; | std::string ip_port; | ||||
bool proxy_enabled = clientModel->getProxyInfo(ip_port); | bool proxy_enabled = clientModel->getProxyInfo(ip_port); | ||||
if (proxy_enabled) { | if (proxy_enabled) { | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |