#51 - Show zcashd tab only if there is embedded zcashd running
This commit is contained in:
@@ -71,6 +71,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
// Initialize to the balances tab
|
// Initialize to the balances tab
|
||||||
ui->tabWidget->setCurrentIndex(0);
|
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();
|
setupSendTab();
|
||||||
setupTransactionsTab();
|
setupTransactionsTab();
|
||||||
setupRecieveTab();
|
setupRecieveTab();
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public:
|
|||||||
QLabel* statusLabel;
|
QLabel* statusLabel;
|
||||||
QLabel* statusIcon;
|
QLabel* statusIcon;
|
||||||
QLabel* loadingLabel;
|
QLabel* loadingLabel;
|
||||||
|
QWidget* zcashdtab;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event);
|
||||||
|
|||||||
@@ -67,8 +67,10 @@ RPC::~RPC() {
|
|||||||
void RPC::setEZcashd(QProcess* p) {
|
void RPC::setEZcashd(QProcess* p) {
|
||||||
ezcashd = p;
|
ezcashd = p;
|
||||||
|
|
||||||
if (ezcashd == nullptr)
|
if (ezcashd) {
|
||||||
ui->tabWidget->removeTab(4);
|
ui->tabWidget->addTab(main->zcashdtab, "zcashd");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RPC::setConnection(Connection* c) {
|
void RPC::setConnection(Connection* c) {
|
||||||
|
|||||||
Reference in New Issue
Block a user