|
|
@ -80,7 +80,8 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n |
|
|
|
clientModel(0), |
|
|
|
clientModel(0), |
|
|
|
walletFrame(0), |
|
|
|
walletFrame(0), |
|
|
|
unitDisplayControl(0), |
|
|
|
unitDisplayControl(0), |
|
|
|
labelEncryptionIcon(0), |
|
|
|
labelWalletEncryptionIcon(0), |
|
|
|
|
|
|
|
labelWalletHDStatusIcon(0), |
|
|
|
labelConnectionsIcon(0), |
|
|
|
labelConnectionsIcon(0), |
|
|
|
labelBlocksIcon(0), |
|
|
|
labelBlocksIcon(0), |
|
|
|
progressBarLabel(0), |
|
|
|
progressBarLabel(0), |
|
|
@ -194,7 +195,8 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n |
|
|
|
frameBlocksLayout->setContentsMargins(3,0,3,0); |
|
|
|
frameBlocksLayout->setContentsMargins(3,0,3,0); |
|
|
|
frameBlocksLayout->setSpacing(3); |
|
|
|
frameBlocksLayout->setSpacing(3); |
|
|
|
unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle); |
|
|
|
unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle); |
|
|
|
labelEncryptionIcon = new QLabel(); |
|
|
|
labelWalletEncryptionIcon = new QLabel(); |
|
|
|
|
|
|
|
labelWalletHDStatusIcon = new QLabel(); |
|
|
|
labelConnectionsIcon = new QLabel(); |
|
|
|
labelConnectionsIcon = new QLabel(); |
|
|
|
labelBlocksIcon = new QLabel(); |
|
|
|
labelBlocksIcon = new QLabel(); |
|
|
|
if(enableWallet) |
|
|
|
if(enableWallet) |
|
|
@ -202,7 +204,8 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n |
|
|
|
frameBlocksLayout->addStretch(); |
|
|
|
frameBlocksLayout->addStretch(); |
|
|
|
frameBlocksLayout->addWidget(unitDisplayControl); |
|
|
|
frameBlocksLayout->addWidget(unitDisplayControl); |
|
|
|
frameBlocksLayout->addStretch(); |
|
|
|
frameBlocksLayout->addStretch(); |
|
|
|
frameBlocksLayout->addWidget(labelEncryptionIcon); |
|
|
|
frameBlocksLayout->addWidget(labelWalletEncryptionIcon); |
|
|
|
|
|
|
|
frameBlocksLayout->addWidget(labelWalletHDStatusIcon); |
|
|
|
} |
|
|
|
} |
|
|
|
frameBlocksLayout->addStretch(); |
|
|
|
frameBlocksLayout->addStretch(); |
|
|
|
frameBlocksLayout->addWidget(labelConnectionsIcon); |
|
|
|
frameBlocksLayout->addWidget(labelConnectionsIcon); |
|
|
@ -988,28 +991,37 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setHDStatus(int hdEnabled) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
labelWalletHDStatusIcon->setPixmap(platformStyle->SingleColorIcon(hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); |
|
|
|
|
|
|
|
labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// eventually disable the QLabel to set its opacity to 50%
|
|
|
|
|
|
|
|
labelWalletHDStatusIcon->setEnabled(hdEnabled); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setEncryptionStatus(int status) |
|
|
|
void BitcoinGUI::setEncryptionStatus(int status) |
|
|
|
{ |
|
|
|
{ |
|
|
|
switch(status) |
|
|
|
switch(status) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case WalletModel::Unencrypted: |
|
|
|
case WalletModel::Unencrypted: |
|
|
|
labelEncryptionIcon->hide(); |
|
|
|
labelWalletEncryptionIcon->hide(); |
|
|
|
encryptWalletAction->setChecked(false); |
|
|
|
encryptWalletAction->setChecked(false); |
|
|
|
changePassphraseAction->setEnabled(false); |
|
|
|
changePassphraseAction->setEnabled(false); |
|
|
|
encryptWalletAction->setEnabled(true); |
|
|
|
encryptWalletAction->setEnabled(true); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case WalletModel::Unlocked: |
|
|
|
case WalletModel::Unlocked: |
|
|
|
labelEncryptionIcon->show(); |
|
|
|
labelWalletEncryptionIcon->show(); |
|
|
|
labelEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); |
|
|
|
labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); |
|
|
|
labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>")); |
|
|
|
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>")); |
|
|
|
encryptWalletAction->setChecked(true); |
|
|
|
encryptWalletAction->setChecked(true); |
|
|
|
changePassphraseAction->setEnabled(true); |
|
|
|
changePassphraseAction->setEnabled(true); |
|
|
|
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
|
|
|
|
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case WalletModel::Locked: |
|
|
|
case WalletModel::Locked: |
|
|
|
labelEncryptionIcon->show(); |
|
|
|
labelWalletEncryptionIcon->show(); |
|
|
|
labelEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); |
|
|
|
labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); |
|
|
|
labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>")); |
|
|
|
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>")); |
|
|
|
encryptWalletAction->setChecked(true); |
|
|
|
encryptWalletAction->setChecked(true); |
|
|
|
changePassphraseAction->setEnabled(true); |
|
|
|
changePassphraseAction->setEnabled(true); |
|
|
|
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
|
|
|
|
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
|
|
|
|