Merge pull request 'Xmr.to: disable tor checkbox on Tails and Whonix' (#43) from tobtoht/feather:xmrto_tails_tor into master

Reviewed-on: feather/feather#43
fix-rpath-debug
dsc 4 years ago
commit 9c139e40d3

@ -15,6 +15,7 @@ XMRToWidget::XMRToWidget(QWidget *parent) :
ui(new Ui::XMRToWidget)
{
ui->setupUi(this);
m_ctx = MainWindow::getContext();
QString amount_rx = R"(^\d*\.\d*$)";
QRegExp rx;
@ -62,6 +63,10 @@ XMRToWidget::XMRToWidget(QWidget *parent) :
m_contextMenu->popup(ui->historyTable->viewport()->mapToGlobal(point));
}
});
if (m_ctx->isTails || m_ctx->isWhonix) {
ui->torCheckBox->setDisabled(true);
}
}
void XMRToWidget::setHistoryModel(XmrToModel *model) {
@ -81,8 +86,6 @@ void XMRToWidget::onWalletClosed() {
void XMRToWidget::onCreateOrder() {
// @TODO: regex verify
if(m_ctx == nullptr)
this->m_ctx = MainWindow::getContext();
auto amount = ui->lineAmount->text();
if(amount.isEmpty()) {
@ -123,9 +126,6 @@ void XMRToWidget::onTorCheckBoxToggled(int state) {
}
void XMRToWidget::updateConversionLabel() {
if(m_ctx == nullptr)
this->m_ctx = MainWindow::getContext();
QString amount = ui->lineAmount->text();
int curIndex = ui->comboBox_currency->currentIndex();

@ -51,7 +51,8 @@ private:
Ui::XMRToWidget *ui;
AppContext *m_ctx;
bool m_ratesDisplayed = false;
const QString m_regionBlockMessage = "Beware that XMR.To region blocks certain IPs, which can be problematic in combination with Tor. Use the clearnet option if this is a problem.";
const QString m_regionBlockMessage = "Beware that XMR.To region blocks certain IPs, which can be problematic in combination with Tor. "
"Wait a few minutes for the circuit to switch, or disable the option to relay over Tor if the problem persists.";
double m_unlockedBalance = 0;
XmrToModel *tableModel;

Loading…
Cancel
Save