diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 10a2018..a978389 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -59,7 +59,7 @@ - 5 + 1 @@ -426,7 +426,7 @@ 0 0 1226 - 488 + 493 @@ -611,33 +611,6 @@ - - - - Recurring payment - - - - - - - Every month, starting 12-May-2012, for 6 payments - - - - - - - Edit Schedule - - - false - - - false - - - diff --git a/src/sendtab.cpp b/src/sendtab.cpp index ce04a54..6f3fc11 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -138,7 +138,7 @@ void MainWindow::setupSendTab() { ui->MemoTxt1->setFont(f); // Recurring button - QObject::connect(ui->chkRecurring, &QCheckBox::stateChanged, [=] (int checked) { + /*QObject::connect(ui->chkRecurring, &QCheckBox::stateChanged, [=] (int checked) { if (checked) { ui->btnRecurSchedule->setEnabled(true); @@ -150,23 +150,23 @@ void MainWindow::setupSendTab() { ui->btnRecurSchedule->setEnabled(false); ui->lblRecurDesc->setText(""); } - }); + });*/ // Recurring schedule button - QObject::connect(ui->btnRecurSchedule, &QPushButton::clicked, this, &MainWindow::editSchedule); + // QObject::connect(ui->btnRecurSchedule, &QPushButton::clicked, this, &MainWindow::editSchedule); // Set the default state for the whole page clearSendForm(); } void MainWindow::disableRecurring() { - if (!Settings::getInstance()->isTestnet()) { +/* if (!Settings::getInstance()->isTestnet()) { ui->chkRecurring->setVisible(false); ui->chkRecurring->setEnabled(false); ui->btnRecurSchedule->setVisible(false); ui->btnRecurSchedule->setEnabled(false); - ui->action_Recurring_Payments->setVisible(false); - } + ui->action_Recurring_Payments->setVisible(false);*/ + // } } void MainWindow::editSchedule() { @@ -185,21 +185,21 @@ void MainWindow::editSchedule() { } // Open the edit schedule dialog - auto recurringInfo = Recurring::getInstance()->getNewRecurringFromTx(this, this, - createTxFromSendPage(), this->sendTxRecurringInfo); - if (recurringInfo == nullptr) { + // auto recurringInfo = Recurring::getInstance()->getNewRecurringFromTx(this, this, + // createTxFromSendPage(), this->sendTxRecurringInfo); + // if (recurringInfo == nullptr) { // User pressed cancel. // If there is no existing recurring info, uncheck the recurring box - if (sendTxRecurringInfo == nullptr) { - ui->chkRecurring->setCheckState(Qt::Unchecked); - } - } - else { - delete this->sendTxRecurringInfo; + // if (sendTxRecurringInfo == nullptr) { + // ui->chkRecurring->setCheckState(Qt::Unchecked); + // } + // } + // else { + // delete this->sendTxRecurringInfo; - this->sendTxRecurringInfo = recurringInfo; - ui->lblRecurDesc->setText(recurringInfo->getScheduleDescription()); - } + // this->sendTxRecurringInfo = recurringInfo; + // ui->lblRecurDesc->setText(recurringInfo->getScheduleDescription()); + //} } void MainWindow::updateLabelsAutoComplete() { @@ -311,11 +311,11 @@ void MainWindow::addAddressSection() { // Disable recurring payments if a address section is added, since recurring payments // aren't supported for more than 1 address - delete sendTxRecurringInfo; - sendTxRecurringInfo = nullptr; - ui->lblRecurDesc->setText(""); - ui->chkRecurring->setChecked(false); - ui->chkRecurring->setEnabled(false); + // delete sendTxRecurringInfo; + // sendTxRecurringInfo = nullptr; + // ui->lblRecurDesc->setText(""); + // ui->chkRecurring->setChecked(false); + // ui->chkRecurring->setEnabled(false); // Set focus into the address Address1->setFocus(); @@ -358,10 +358,10 @@ void MainWindow::amountChanged(int item, const QString& text) { } // If there is a recurring payment, update the info there as well - if (sendTxRecurringInfo != nullptr) { - Recurring::getInstance()->updateInfoWithTx(sendTxRecurringInfo, createTxFromSendPage()); - ui->lblRecurDesc->setText(sendTxRecurringInfo->getScheduleDescription()); - } + //if (sendTxRecurringInfo != nullptr) { + // Recurring::getInstance()->updateInfoWithTx(sendTxRecurringInfo, createTxFromSendPage()); + // ui->lblRecurDesc->setText(sendTxRecurringInfo->getScheduleDescription()); + // } } void MainWindow::setMemoEnabled(int number, bool enabled) { @@ -457,14 +457,14 @@ void MainWindow::clearSendForm() { // Reset the recurring button if (Settings::getInstance()->isTestnet()) { - ui->chkRecurring->setEnabled(true); + // ui->chkRecurring->setEnabled(true); } - ui->chkRecurring->setCheckState(Qt::Unchecked); - ui->btnRecurSchedule->setEnabled(false); - ui->lblRecurDesc->setText(""); - delete sendTxRecurringInfo; - sendTxRecurringInfo = nullptr; + // ui->chkRecurring->setCheckState(Qt::Unchecked); + // ui->btnRecurSchedule->setEnabled(false); + // ui->lblRecurDesc->setText(""); + // delete sendTxRecurringInfo; + // sendTxRecurringInfo = nullptr; } void MainWindow::maxAmountChecked(int checked) {