@@ -80,7 +80,8 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
80
80
clientModel(0 ),
81
81
walletFrame(0 ),
82
82
unitDisplayControl(0 ),
83
- labelEncryptionIcon(0 ),
83
+ labelWalletEncryptionIcon(0 ),
84
+ labelWalletHDStatusIcon(0 ),
84
85
labelConnectionsIcon(0 ),
85
86
labelBlocksIcon(0 ),
86
87
progressBarLabel(0 ),
@@ -194,15 +195,17 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
194
195
frameBlocksLayout->setContentsMargins (3 ,0 ,3 ,0 );
195
196
frameBlocksLayout->setSpacing (3 );
196
197
unitDisplayControl = new UnitDisplayStatusBarControl (platformStyle);
197
- labelEncryptionIcon = new QLabel ();
198
+ labelWalletEncryptionIcon = new QLabel ();
199
+ labelWalletHDStatusIcon = new QLabel ();
198
200
labelConnectionsIcon = new QLabel ();
199
201
labelBlocksIcon = new QLabel ();
200
202
if (enableWallet)
201
203
{
202
204
frameBlocksLayout->addStretch ();
203
205
frameBlocksLayout->addWidget (unitDisplayControl);
204
206
frameBlocksLayout->addStretch ();
205
- frameBlocksLayout->addWidget (labelEncryptionIcon);
207
+ frameBlocksLayout->addWidget (labelWalletEncryptionIcon);
208
+ frameBlocksLayout->addWidget (labelWalletHDStatusIcon);
206
209
}
207
210
frameBlocksLayout->addStretch ();
208
211
frameBlocksLayout->addWidget (labelConnectionsIcon);
@@ -988,28 +991,37 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
988
991
return false ;
989
992
}
990
993
994
+ void BitcoinGUI::setHDStatus (int hdEnabled)
995
+ {
996
+ labelWalletHDStatusIcon->setPixmap (platformStyle->SingleColorIcon (hdEnabled ? " :/icons/hd_enabled" : " :/icons/hd_disabled" ).pixmap (STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
997
+ labelWalletHDStatusIcon->setToolTip (hdEnabled ? tr (" HD key generation is <b>enabled</b>" ) : tr (" HD key generation is <b>disabled</b>" ));
998
+
999
+ // eventually disable the QLabel to set its opacity to 50%
1000
+ labelWalletHDStatusIcon->setEnabled (hdEnabled);
1001
+ }
1002
+
991
1003
void BitcoinGUI::setEncryptionStatus (int status)
992
1004
{
993
1005
switch (status)
994
1006
{
995
1007
case WalletModel::Unencrypted:
996
- labelEncryptionIcon ->hide ();
1008
+ labelWalletEncryptionIcon ->hide ();
997
1009
encryptWalletAction->setChecked (false );
998
1010
changePassphraseAction->setEnabled (false );
999
1011
encryptWalletAction->setEnabled (true );
1000
1012
break ;
1001
1013
case WalletModel::Unlocked:
1002
- labelEncryptionIcon ->show ();
1003
- labelEncryptionIcon ->setPixmap (platformStyle->SingleColorIcon (" :/icons/lock_open" ).pixmap (STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
1004
- labelEncryptionIcon ->setToolTip (tr (" Wallet is <b>encrypted</b> and currently <b>unlocked</b>" ));
1014
+ labelWalletEncryptionIcon ->show ();
1015
+ labelWalletEncryptionIcon ->setPixmap (platformStyle->SingleColorIcon (" :/icons/lock_open" ).pixmap (STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
1016
+ labelWalletEncryptionIcon ->setToolTip (tr (" Wallet is <b>encrypted</b> and currently <b>unlocked</b>" ));
1005
1017
encryptWalletAction->setChecked (true );
1006
1018
changePassphraseAction->setEnabled (true );
1007
1019
encryptWalletAction->setEnabled (false ); // TODO: decrypt currently not supported
1008
1020
break ;
1009
1021
case WalletModel::Locked:
1010
- labelEncryptionIcon ->show ();
1011
- labelEncryptionIcon ->setPixmap (platformStyle->SingleColorIcon (" :/icons/lock_closed" ).pixmap (STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
1012
- labelEncryptionIcon ->setToolTip (tr (" Wallet is <b>encrypted</b> and currently <b>locked</b>" ));
1022
+ labelWalletEncryptionIcon ->show ();
1023
+ labelWalletEncryptionIcon ->setPixmap (platformStyle->SingleColorIcon (" :/icons/lock_closed" ).pixmap (STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
1024
+ labelWalletEncryptionIcon ->setToolTip (tr (" Wallet is <b>encrypted</b> and currently <b>locked</b>" ));
1013
1025
encryptWalletAction->setChecked (true );
1014
1026
changePassphraseAction->setEnabled (true );
1015
1027
encryptWalletAction->setEnabled (false ); // TODO: decrypt currently not supported
0 commit comments