MCPcopy Create free account
hub / github.com/ElementsProject/elements / setEncryptionStatus

Method setEncryptionStatus

src/qt/bitcoingui.cpp:1288–1321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1286}
1287
1288void BitcoinGUI::setEncryptionStatus(int status)
1289{
1290 switch(status)
1291 {
1292 case WalletModel::NoKeys:
1293 labelWalletEncryptionIcon->hide();
1294 encryptWalletAction->setChecked(false);
1295 changePassphraseAction->setEnabled(false);
1296 encryptWalletAction->setEnabled(false);
1297 break;
1298 case WalletModel::Unencrypted:
1299 labelWalletEncryptionIcon->hide();
1300 encryptWalletAction->setChecked(false);
1301 changePassphraseAction->setEnabled(false);
1302 encryptWalletAction->setEnabled(true);
1303 break;
1304 case WalletModel::Unlocked:
1305 labelWalletEncryptionIcon->show();
1306 labelWalletEncryptionIcon->setThemedPixmap(QStringLiteral(":/icons/lock_open"), STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
1307 labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
1308 encryptWalletAction->setChecked(true);
1309 changePassphraseAction->setEnabled(true);
1310 encryptWalletAction->setEnabled(false);
1311 break;
1312 case WalletModel::Locked:
1313 labelWalletEncryptionIcon->show();
1314 labelWalletEncryptionIcon->setThemedPixmap(QStringLiteral(":/icons/lock_closed"), STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
1315 labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
1316 encryptWalletAction->setChecked(true);
1317 changePassphraseAction->setEnabled(true);
1318 encryptWalletAction->setEnabled(false);
1319 break;
1320 }
1321}
1322
1323void BitcoinGUI::updateWalletStatus()
1324{

Callers

nothing calls this directly

Calls 2

setThemedPixmapMethod · 0.80
setEnabledMethod · 0.45

Tested by

no test coverage detected