Skip to content

Commit

Permalink
Merge #600: [GUI] Only enable/disable PrivacyDialog zPIV elements if …
Browse files Browse the repository at this point in the history
…needed.

2b76f31 Only enable/disable PrivacyDialog zPIV elements if needed. (presstab)

Tree-SHA512: 18f82435742f4be272e7a82544fc0fd7f672fd9e676f82026b9225025cd373007a7d3b8df81618eb62788a27cba45a01865c008f35871efd9ed94ec7161016ac
  • Loading branch information
Mrs-X committed May 9, 2018
2 parents 766d519 + 2b76f31 commit 2174335
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qt/privacydialog.cpp
Expand Up @@ -791,16 +791,17 @@ void PrivacyDialog::updateAutomintStatus()
void PrivacyDialog::updateSPORK16Status()
{
// Update/enable labels, buttons and tooltips depending on the current SPORK_16 status
if(GetAdjustedTime() > GetSporkValue(SPORK_16_ZEROCOIN_MAINTENANCE_MODE)) {
bool fButtonsEnabled = ui->pushButtonMintzPIV->isEnabled();
bool fMaintenanceMode = GetAdjustedTime() > GetSporkValue(SPORK_16_ZEROCOIN_MAINTENANCE_MODE);
if (fMaintenanceMode && fButtonsEnabled) {
// Mint zPIV
ui->pushButtonMintzPIV->setEnabled(false);
ui->pushButtonMintzPIV->setToolTip(tr("zPIV is currently disabled due to maintenance."));

// Spend zPIV
ui->pushButtonSpendzPIV->setEnabled(false);
ui->pushButtonSpendzPIV->setToolTip(tr("zPIV is currently disabled due to maintenance."));
}
else {
} else if (!fMaintenanceMode && !fButtonsEnabled) {
// Mint zPIV
ui->pushButtonMintzPIV->setEnabled(true);
ui->pushButtonMintzPIV->setToolTip(tr("PrivacyDialog", "Enter an amount of PIV to convert to zPIV", 0));
Expand Down

0 comments on commit 2174335

Please sign in to comment.