src/qt/sendcoinsdialog.cpp
void SendCoinsDialog::coinControlChangeEdited(const QString & text)
{
    if (model)
    {
        CoinControlDialog::coinControl->destChange = CBitcoinAddress(text.toStdString()).Get();

        // label for the change address
        ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
        if (text.isEmpty())
            ui->labelCoinControlChangeLabel->setText("");
        else if (!CBitcoinAddress(text.toStdString()).IsValid())
        {
            ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
            ui->labelCoinControlChangeLabel->setText(tr("WARNING: Invalid Denarius address"));
        }
        else
        {
            QString associatedLabel = model->getAddressTableModel()->labelForAddress(text);
            if (!associatedLabel.isEmpty())
                ui->labelCoinControlChangeLabel->setText(associatedLabel);
            else
            {
                CPubKey pubkey;
                CKeyID keyid;
                CBitcoinAddress(text.toStdString()).GetKeyID(keyid);
                if (model->getPubKey(keyid, pubkey))
                    ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
                else
                {
                    ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
                    ui->labelCoinControlChangeLabel->setText(tr("WARNING: unknown change address"));
                }
            }
        }
    }
}
// Coin Control: custom change address changed
Coin Control: custom change address changed
Coin Control : custom change address changed
void SendCoinsDialog::coinControlChangeEdited(const QString & text)
{
    if (model)
    {
        CoinControlDialog::coinControl->destChange = CBitcoinAddress(text.toStdString()).Get();
        ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
        if (text.isEmpty())
            ui->labelCoinControlChangeLabel->setText("");
        else if (!CBitcoinAddress(text.toStdString()).IsValid())
        {
            ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
            ui->labelCoinControlChangeLabel->setText(tr("WARNING: Invalid Denarius address"));
        }
        else
        {
            QString associatedLabel = model->getAddressTableModel()->labelForAddress(text);
            if (!associatedLabel.isEmpty())
                ui->labelCoinControlChangeLabel->setText(associatedLabel);
            else
            {
                CPubKey pubkey;
                CKeyID keyid;
                CBitcoinAddress(text.toStdString()).GetKeyID(keyid);
                if (model->getPubKey(keyid, pubkey))
                    ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
                else
                {
                    ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
                    ui->labelCoinControlChangeLabel->setText(tr("WARNING: unknown change address"));
                }
            }
        }
    }
}
void SendCoinsDialog :: coinControlChangeEdited ( const QString & text ) { if ( model ) { CoinControlDialog :: coinControl -> destChange = CBitcoinAddress ( text . toStdString ( ) ) . Get ( ) ; ui -> labelCoinControlChangeLabel -> setStyleSheet ( " " ) ; if ( text . isEmpty ( ) ) ui -> labelCoinControlChangeLabel -> setText ( " " ) ; else if ( ! CBitcoinAddress ( text . toStdString ( ) ) . IsValid ( ) ) { ui -> labelCoinControlChangeLabel -> setStyleSheet ( " " ) ; ui -> labelCoinControlChangeLabel -> setText ( tr ( " " ) ) ; } else { QString associatedLabel = model -> getAddressTableModel ( ) -> labelForAddress ( text ) ; if ( ! associatedLabel . isEmpty ( ) ) ui -> labelCoinControlChangeLabel -> setText ( associatedLabel ) ; else { CPubKey pubkey ; CKeyID keyid ; CBitcoinAddress ( text . toStdString ( ) ) . GetKeyID ( keyid ) ; if ( model -> getPubKey ( keyid , pubkey ) ) ui -> labelCoinControlChangeLabel -> setText ( tr ( " " ) ) ; else { ui -> labelCoinControlChangeLabel -> setStyleSheet ( " " ) ; ui -> labelCoinControlChangeLabel -> setText ( tr ( " " ) ) ; } } } } }
Coin Control: custom change address changed
Coin Control : custom change address changed
// label for the change address