From 2d82c27b638dcb43951b05d068ab398ea3feac64 Mon Sep 17 00:00:00 2001 From: adityapk00 Date: Sun, 28 Oct 2018 16:53:40 -0700 Subject: [PATCH] Add send from in the balances tab --- src/mainwindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ad49dba..6ffe036 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -242,6 +242,19 @@ void MainWindow::setupBalancesTab() { ui->statusBar->showMessage("Copied to clipboard", 3 * 1000); }); + menu.addAction("Send from " % addr.left(40) % (addr.size() > 40 ? "..." : ""), [=]() { + // Find the inputs combo + for (int i = 0; i < ui->inputsCombo->count(); i++) { + if (ui->inputsCombo->itemText(i).startsWith(addr)) { + ui->inputsCombo->setCurrentIndex(i); + break; + } + } + + // And switch to the send tab. + ui->tabWidget->setCurrentIndex(1); + }); + if (addr.startsWith("t")) { menu.addAction("View on block explorer", [=] () { QString url;