Browse Source

#51 - Show zcashd tab only if there is embedded zcashd running

import_zecw
Aditya Kulkarni 6 years ago
parent
commit
2ade31b69e
  1. 4
      src/mainwindow.cpp
  2. 1
      src/mainwindow.h
  3. 6
      src/rpc.cpp

4
src/mainwindow.cpp

@ -71,6 +71,10 @@ MainWindow::MainWindow(QWidget *parent) :
// Initialize to the balances tab
ui->tabWidget->setCurrentIndex(0);
// The zcashd tab is hidden by default, and only later added in if the embedded zcashd is started
zcashdtab = ui->tabWidget->widget(4);
ui->tabWidget->removeTab(4);
setupSendTab();
setupTransactionsTab();
setupRecieveTab();

1
src/mainwindow.h

@ -43,6 +43,7 @@ public:
QLabel* statusLabel;
QLabel* statusIcon;
QLabel* loadingLabel;
QWidget* zcashdtab;
private:
void closeEvent(QCloseEvent* event);

6
src/rpc.cpp

@ -67,8 +67,10 @@ RPC::~RPC() {
void RPC::setEZcashd(QProcess* p) {
ezcashd = p;
if (ezcashd == nullptr)
ui->tabWidget->removeTab(4);
if (ezcashd) {
ui->tabWidget->addTab(main->zcashdtab, "zcashd");
}
}
void RPC::setConnection(Connection* c) {

Loading…
Cancel
Save