Skip to content

Commit

Permalink
Remove sigmadialog from UI (#1224)
Browse files Browse the repository at this point in the history
* Remove sigmadialog from UI

* Try to fix build

* More cleanup

---------

Co-authored-by: levonpetrosyan93 <[email protected]>
  • Loading branch information
firstcryptoman and levonpetrosyan93 committed May 17, 2023
1 parent 8fd6876 commit cbac05d
Show file tree
Hide file tree
Showing 21 changed files with 11 additions and 4,107 deletions.
10 changes: 0 additions & 10 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ QT_TS = \

QT_FORMS_UI = \
qt/forms/addressbookpage.ui \
qt/forms/blanksigmadialog.ui \
qt/forms/sigmadialog.ui \
qt/forms/sigmacoincontroldialog.ui \
qt/forms/askpassphrasedialog.ui \
qt/forms/automintdialog.ui \
qt/forms/automintnotification.ui \
Expand Down Expand Up @@ -138,8 +135,6 @@ QT_MOC_CPP = \
qt/moc_addressbookpage.cpp \
qt/moc_automintdialog.cpp \
qt/moc_automintnotification.cpp \
qt/moc_sigmadialog.cpp \
qt/moc_sigmacoincontroldialog.cpp \
qt/moc_addresstablemodel.cpp \
qt/moc_askpassphrasedialog.cpp \
qt/moc_bantablemodel.cpp \
Expand Down Expand Up @@ -231,8 +226,6 @@ BITCOIN_QT_H = \
qt/addressbookpage.h \
qt/automintdialog.h \
qt/automintnotification.h \
qt/sigmadialog.h \
qt/sigmacoincontroldialog.h \
qt/addresstablemodel.h \
qt/askpassphrasedialog.h \
qt/bantablemodel.h \
Expand Down Expand Up @@ -318,7 +311,6 @@ RES_ICONS = \
qt/res/icons/bitcoin.png \
qt/res/icons/firo.png \
qt/res/icons/zerocoin.png \
qt/res/icons/sigma.png \
qt/res/icons/paymentcode.png \
qt/res/icons/masternodes.png \
qt/res/icons/qrcode.png \
Expand Down Expand Up @@ -466,8 +458,6 @@ BITCOIN_QT_WALLET_CPP = \
qt/addressbookpage.cpp \
qt/automintdialog.cpp \
qt/automintnotification.cpp \
qt/sigmadialog.cpp \
qt/sigmacoincontroldialog.cpp \
qt/addresstablemodel.cpp \
qt/askpassphrasedialog.cpp \
qt/coincontroldialog.cpp \
Expand Down
1 change: 0 additions & 1 deletion src/qt/bitcoin.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<file alias="history">res/icons/history.png</file>
<file alias="qrcode">res/icons/qrcode.png</file>
<file alias="zerocoin">res/icons/zerocoin.png</file>
<file alias="sigma">res/icons/sigma.png</file>
<file alias="znodes">res/icons/masternodes.png</file>
<file alias="overview">res/icons/overview.png</file>
<file alias="export">res/icons/export.png</file>
Expand Down
33 changes: 1 addition & 32 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "chainparams.h"
#include "init.h"
#include "lelantus.h"
#include "sigma.h"
#include "ui_interface.h"
#include "util.h"

Expand Down Expand Up @@ -133,7 +132,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
openRPCConsoleAction(0),
openAction(0),
showHelpMessageAction(0),
sigmaAction(0),
lelantusAction(0),
masternodeAction(0),
createPcodeAction(0),
Expand Down Expand Up @@ -364,14 +362,6 @@ void BitcoinGUI::createActions()
tabGroup->addAction(historyAction);

#ifdef ENABLE_WALLET
sigmaAction = new QAction(tr("Si&gma"), this);
sigmaAction->setStatusTip(tr("Anonymize your coins and perform private transfers using Sigma"));
sigmaAction->setToolTip(sigmaAction->statusTip());
sigmaAction->setCheckable(true);
sigmaAction->setShortcut(QKeySequence(Qt::ALT + key++));
tabGroup->addAction(sigmaAction);
sigmaAction->setVisible(false);

lelantusAction = new QAction(tr("&Lelantus"), this);
lelantusAction->setStatusTip(tr("Anonymize your coins"));
lelantusAction->setToolTip(lelantusAction->statusTip());
Expand Down Expand Up @@ -436,7 +426,7 @@ void BitcoinGUI::createActions()
connect(receiveCoinsMenuAction, &QAction::triggered, this, &BitcoinGUI::gotoReceiveCoinsPage);
connect(historyAction, &QAction::triggered, this, [this]{ showNormalIfMinimized(); });
connect(historyAction, &QAction::triggered, this, &BitcoinGUI::gotoHistoryPage);
connect(sigmaAction, &QAction::triggered, this, &BitcoinGUI::gotoSigmaPage);

connect(lelantusAction, &QAction::triggered, this, &BitcoinGUI::gotoLelantusPage);
connect(createPcodeAction, &QAction::triggered, this, &BitcoinGUI::gotoCreatePcodePage);
#ifdef ENABLE_ELYSIUM
Expand Down Expand Up @@ -583,7 +573,6 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(sigmaAction);
toolbar->addAction(lelantusAction);
toolbar->addAction(masternodeAction);

Expand Down Expand Up @@ -670,7 +659,6 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
checkZnodeVisibility(blocks);

#ifdef ENABLE_WALLET
checkSigmaVisibility(blocks);
checkLelantusVisibility(blocks);
#endif // ENABLE_WALLET
}
Expand Down Expand Up @@ -728,7 +716,6 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
receiveCoinsMenuAction->setEnabled(enabled);
createPcodeAction->setEnabled(enabled);
historyAction->setEnabled(enabled);
sigmaAction->setEnabled(enabled);
lelantusAction->setEnabled(enabled);
masternodeAction->setEnabled(enabled);
encryptWalletAction->setEnabled(enabled);
Expand Down Expand Up @@ -927,12 +914,6 @@ void BitcoinGUI::gotoSignMessageTab(QString addr)
if (walletFrame) walletFrame->gotoSignMessageTab(addr);
}

void BitcoinGUI::gotoSigmaPage()
{
sigmaAction->setChecked(true);
if (walletFrame) walletFrame->gotoSigmaPage();
}

void BitcoinGUI::gotoLelantusPage()
{
lelantusAction->setChecked(true);
Expand Down Expand Up @@ -1103,7 +1084,6 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
progressBar->setToolTip(tooltip);

#ifdef ENABLE_WALLET
checkSigmaVisibility(count);
checkLelantusVisibility(count);
#endif // ENABLE_WALLET

Expand Down Expand Up @@ -1518,17 +1498,6 @@ void BitcoinGUI::checkZnodeVisibility(int numBlocks) {
}
}

void BitcoinGUI::checkSigmaVisibility(int numBlocks)
{
auto allowSigmaPage = sigma::IsSigmaAllowed(numBlocks) && !lelantus::IsLelantusAllowed(numBlocks);
if (allowSigmaPage != sigmaAction->isVisible()) {
if (!allowSigmaPage && sigmaAction->isChecked()) {
gotoOverviewPage();
}
sigmaAction->setVisible(allowSigmaPage);
}
}

void BitcoinGUI::checkLelantusVisibility(int numBlocks)
{
auto allowLelantusPage = false;
Expand Down
5 changes: 0 additions & 5 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class BitcoinGUI : public QMainWindow
QAction *openRPCConsoleAction;
QAction *openAction;
QAction *showHelpMessageAction;
QAction *sigmaAction;
QAction *lelantusAction;
QAction *masternodeAction;
QAction *createPcodeAction;
Expand Down Expand Up @@ -164,8 +163,6 @@ class BitcoinGUI : public QMainWindow

/** Updates Znode visibility */
void checkZnodeVisibility(int numBlocks);
/** Updates Sigma visibility */
void checkSigmaVisibility(int numBlocks);
/** Updates Lelantus visibility */
void checkLelantusVisibility(int numBlocks);
/** Update UI with latest network info from model. */
Expand Down Expand Up @@ -241,8 +238,6 @@ public Q_SLOTS:
void gotoCreatePcodePage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");
/** Switch to sigma page */
void gotoSigmaPage();
/** Switch to lelantus page */
void gotoLelantusPage();

Expand Down
38 changes: 0 additions & 38 deletions src/qt/forms/blanksigmadialog.ui

This file was deleted.

Loading

0 comments on commit cbac05d

Please sign in to comment.