fixes to staking gui
This commit is contained in:
@@ -82,7 +82,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
|
||||
labelEncryptionIcon(0),
|
||||
labelConnectionsIcon(0),
|
||||
labelBlocksIcon(0),
|
||||
labelStakingIcon(0),
|
||||
progressBarLabel(0),
|
||||
progressBar(0),
|
||||
progressDialog(0),
|
||||
@@ -200,13 +199,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
|
||||
labelConnectionsIcon = new QLabel();
|
||||
labelBlocksIcon = new QLabel();
|
||||
labelStakingIcon = new QLabel();
|
||||
// if (GetBoolArg("-staking", true))
|
||||
// {
|
||||
QTimer *timerStakingIcon = new QTimer(labelStakingIcon);
|
||||
connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));
|
||||
timerStakingIcon->start(30 * 1000);
|
||||
updateStakingIcon();
|
||||
// }
|
||||
|
||||
if(enableWallet)
|
||||
{
|
||||
@@ -222,6 +214,15 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
|
||||
frameBlocksLayout->addStretch();
|
||||
frameBlocksLayout->addWidget(labelBlocksIcon);
|
||||
frameBlocksLayout->addStretch();
|
||||
|
||||
if (GetBoolArg("-staking", true))
|
||||
{
|
||||
QTimer *timerStakingIcon = new QTimer(labelStakingIcon);
|
||||
connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));
|
||||
timerStakingIcon->start(30 * 1000);
|
||||
|
||||
updateStakingIcon();
|
||||
}
|
||||
|
||||
|
||||
// Progress bar and label for blocks download
|
||||
|
||||
@@ -188,7 +188,6 @@ unsigned long long WalletFrame::updateWeight()
|
||||
WalletView *walletView = currentWalletView();
|
||||
if (walletView)
|
||||
return walletView->updateWeight();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WalletFrame::usedSendingAddresses()
|
||||
|
||||
@@ -680,15 +680,15 @@ bool WalletModel::saveReceiveRequest(const std::string &sAddress, const int64_t
|
||||
unsigned long long WalletModel::updateWeight()
|
||||
{
|
||||
if (!wallet)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
if (!lockMain)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
TRY_LOCK(wallet->cs_wallet, lockWallet);
|
||||
if (!lockWallet)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
return wallet->GetStakeWeight();
|
||||
}
|
||||
|
||||
@@ -284,9 +284,8 @@ void WalletView::lockWallet()
|
||||
|
||||
unsigned long long WalletView::updateWeight()
|
||||
{
|
||||
if(!walletModel)
|
||||
return 0;
|
||||
return walletModel->updateWeight();
|
||||
if(walletModel)
|
||||
return walletModel->updateWeight();
|
||||
}
|
||||
|
||||
void WalletView::usedSendingAddresses()
|
||||
|
||||
Reference in New Issue
Block a user