Merge pull request #32 from adityapk00/embedded
Embedded zcashd for windows and linux
This commit is contained in:
@@ -75,6 +75,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
setupRecieveTab();
|
||||
setupBalancesTab();
|
||||
setupTurnstileDialog();
|
||||
setupZcashdTab();
|
||||
|
||||
rpc = new RPC(this);
|
||||
|
||||
@@ -97,6 +98,10 @@ void MainWindow::closeEvent(QCloseEvent* event) {
|
||||
s.setValue("baltablegeometry", ui->balancesTable->horizontalHeader()->saveState());
|
||||
s.setValue("tratablegeometry", ui->transactionsTable->horizontalHeader()->saveState());
|
||||
|
||||
// Let the RPC know to shutdown any running service.
|
||||
rpc->shutdownZcashd();
|
||||
|
||||
// Bubble up
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
@@ -369,13 +374,6 @@ void MainWindow::setupSettingsModal() {
|
||||
QIntValidator validator(0, 65535);
|
||||
settings.port->setValidator(&validator);
|
||||
|
||||
// Load current values into the dialog
|
||||
auto conf = Settings::getInstance()->getSettings();
|
||||
settings.hostname->setText(conf.host);
|
||||
settings.port->setText(conf.port);
|
||||
settings.rpcuser->setText(conf.rpcuser);
|
||||
settings.rpcpassword->setText(conf.rpcpassword);
|
||||
|
||||
// If values are coming from zcash.conf, then disable all the fields
|
||||
auto zcashConfLocation = Settings::getInstance()->getZcashdConfLocation();
|
||||
if (!zcashConfLocation.isEmpty()) {
|
||||
@@ -386,6 +384,13 @@ void MainWindow::setupSettingsModal() {
|
||||
settings.rpcpassword->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
// Load current values into the dialog
|
||||
auto conf = Settings::getInstance()->getSettings();
|
||||
settings.hostname->setText(conf.host);
|
||||
settings.port->setText(conf.port);
|
||||
settings.rpcuser->setText(conf.rpcuser);
|
||||
settings.rpcpassword->setText(conf.rpcpassword);
|
||||
|
||||
settings.confMsg->setText("No local zcash.conf found. Please configure connection manually.");
|
||||
settings.hostname->setEnabled(true);
|
||||
settings.port->setEnabled(true);
|
||||
@@ -739,6 +744,10 @@ void MainWindow::setupBalancesTab() {
|
||||
});
|
||||
}
|
||||
|
||||
void MainWindow::setupZcashdTab() {
|
||||
ui->zcashdlogo->setBasePixmap(QPixmap(":/img/res/zcashdlogo.gif"));
|
||||
}
|
||||
|
||||
void MainWindow::setupTransactionsTab() {
|
||||
// Double click opens up memo if one exists
|
||||
QObject::connect(ui->transactionsTable, &QTableView::doubleClicked, [=] (auto index) {
|
||||
|
||||
Reference in New Issue
Block a user