Merge #15084: gui: don't disable the sync overlay when wallet is disabled

b3b6b6f62fcabea9818e8049dba714d0d0ef8ab6 gui: don't disable the sync overlay when wallet is disabled (Ben Carman)

Pull request description:

  Continuation of #13848.

  When running with `-disablewallet` the sync modal is now available by clicking on the progress bar or `syncing` icon.

  [Current Image of what the window looks like](https://imgur.com/6LsoT2l)

  Fixes #13828.

ACKs for top commit:
  jonasschnelli:
    Tested ACK b3b6b6f62fcabea9818e8049dba714d0d0ef8ab6

Tree-SHA512: 325bc22a0b692bfb8fcc9d84e02dfc506146028b97b3609e23c2c45288c79b8aead1ad2e9b8d692f5f6771b4d2aee63fbe71bfaeaf17d260865da32ab3631e07
This commit is contained in:
Jonas Schnelli 2019-10-18 09:13:58 +02:00 committed by Vijay Das Manikpuri
parent 8853b6e1e4
commit 59f9ea5815
No known key found for this signature in database
GPG Key ID: DB1D81B01DB7C46E
3 changed files with 9 additions and 5 deletions

View File

@ -208,12 +208,12 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle,
openOptionsDialogWithTab(OptionsDialog::TAB_NETWORK);
});
modalOverlay = new ModalOverlay(this->centralWidget());
modalOverlay = new ModalOverlay(enableWallet, this->centralWidget());
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
#ifdef ENABLE_WALLET
if(enableWallet) {
connect(walletFrame, &WalletFrame::requestedSyncWarningInfo, this, &BitcoinGUI::showModalOverlay);
connect(labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this, &BitcoinGUI::showModalOverlay);
connect(progressBar, &GUIUtil::ClickableProgressBar::clicked, this, &BitcoinGUI::showModalOverlay);
}
#endif

View File

@ -12,7 +12,7 @@
#include <QResizeEvent>
#include <QPropertyAnimation>
ModalOverlay::ModalOverlay(QWidget *parent) :
ModalOverlay::ModalOverlay(bool enable_wallet, QWidget *parent) :
QWidget(parent),
ui(new Ui::ModalOverlay),
bestHeaderHeight(0),
@ -43,6 +43,10 @@ foreverHidden(false)
setVisible(false);
GUIUtil::updateFonts();
if (!enable_wallet) {
ui->infoText->setVisible(false);
ui->infoTextStrong->setText(tr("Dash Core is currently syncing. It will download headers and blocks from peers and validate them until reaching the tip of the block chain."));
}
}
ModalOverlay::~ModalOverlay()

View File

@ -21,7 +21,7 @@ class ModalOverlay : public QWidget
Q_OBJECT
public:
explicit ModalOverlay(QWidget *parent);
explicit ModalOverlay(bool enable_wallet, QWidget *parent);
~ModalOverlay();
public Q_SLOTS: