Skip to content

Commit

Permalink
Strip RAP addresses page (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 authored Apr 27, 2024
1 parent fb1c99f commit f55383c
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 630 deletions.
6 changes: 1 addition & 5 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ QT_FORMS_UI = \
qt/forms/sendtopcodedialog.ui \
qt/forms/signverifymessagedialog.ui \
qt/forms/transactiondescdialog.ui \
qt/forms/lelantusdialog.ui \
qt/forms/createpcodedialog.ui
qt/forms/lelantusdialog.ui

QT_MOC_CPP = \
qt/moc_addressbookpage.cpp \
Expand All @@ -139,7 +138,6 @@ QT_MOC_CPP = \
qt/moc_manualmintdialog.cpp \
qt/moc_coincontroltreewidget.cpp \
qt/moc_csvmodelwriter.cpp \
qt/moc_createpcodedialog.cpp \
qt/moc_editaddressdialog.cpp \
qt/moc_guiutil.cpp \
qt/moc_intro.cpp \
Expand Down Expand Up @@ -215,7 +213,6 @@ BITCOIN_QT_H = \
qt/cancelpassworddialog.h \
qt/clientmodel.h \
qt/coincontroldialog.h \
qt/createpcodedialog.h \
qt/manualmintdialog.h \
qt/coincontroltreewidget.h \
qt/csvmodelwriter.h \
Expand Down Expand Up @@ -429,7 +426,6 @@ BITCOIN_QT_WALLET_CPP = \
qt/askpassphrasedialog.cpp \
qt/coincontroldialog.cpp \
qt/coincontroltreewidget.cpp \
qt/createpcodedialog.cpp \
qt/editaddressdialog.cpp \
qt/manualmintdialog.cpp \
qt/openuridialog.cpp \
Expand Down
31 changes: 1 addition & 30 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
showHelpMessageAction(0),
lelantusAction(0),
masternodeAction(0),
createPcodeAction(0),
logoAction(0),
trayIcon(0),
trayIconMenu(0),
Expand Down Expand Up @@ -366,13 +365,6 @@ void BitcoinGUI::createActions()
tabGroup->addAction(masternodeAction);
#endif

createPcodeAction = new QAction(tr("RA&P addresses"), this);
createPcodeAction->setStatusTip(tr("Create RAP addresses (BIP47 payment codes)"));
createPcodeAction->setToolTip(createPcodeAction->statusTip());
createPcodeAction->setCheckable(true);
createPcodeAction->setShortcut(QKeySequence(Qt::ALT + key++));
tabGroup->addAction(createPcodeAction);

#ifdef ENABLE_WALLET
connect(masternodeAction, &QAction::triggered, [this]{ showNormalIfMinimized(); });
connect(masternodeAction, &QAction::triggered, this, &BitcoinGUI::gotoMasternodePage);
Expand All @@ -390,7 +382,6 @@ void BitcoinGUI::createActions()
connect(historyAction, &QAction::triggered, this, &BitcoinGUI::gotoHistoryPage);

connect(lelantusAction, &QAction::triggered, this, &BitcoinGUI::gotoLelantusPage);
connect(createPcodeAction, &QAction::triggered, this, &BitcoinGUI::gotoCreatePcodePage);
#endif // ENABLE_WALLET

quitAction = new QAction(tr("E&xit"), this);
Expand Down Expand Up @@ -531,8 +522,7 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(historyAction);
toolbar->addAction(lelantusAction);
toolbar->addAction(masternodeAction);
toolbar->addAction(createPcodeAction);


QLabel *logoLabel = new QLabel();
logoLabel->setObjectName("lblToolbarLogo");
logoLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
Expand Down Expand Up @@ -593,10 +583,6 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
// update lelantus page if option is changed.
connect(optionsModel, &OptionsModel::lelantusPageChanged, this, &BitcoinGUI::updateLelantusPage);

// update RAP Addresses page if option is changed.
connect(optionsModel, &OptionsModel::enableRapAddressesChanged, this, &BitcoinGUI::setRapAddressesVisible);
createPcodeAction->setVisible(optionsModel->getRapAddresses());

// initialize the disable state of the tray icon with the current value in the model.
setTrayIconVisible(optionsModel->getHideTrayIcon());
}
Expand Down Expand Up @@ -659,7 +645,6 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
sendCoinsMenuAction->setEnabled(enabled);
receiveCoinsAction->setEnabled(enabled);
receiveCoinsMenuAction->setEnabled(enabled);
createPcodeAction->setEnabled(enabled);
historyAction->setEnabled(enabled);
lelantusAction->setEnabled(enabled);
masternodeAction->setEnabled(enabled);
Expand Down Expand Up @@ -811,12 +796,6 @@ void BitcoinGUI::gotoReceiveCoinsPage()
if (walletFrame) walletFrame->gotoReceiveCoinsPage();
}

void BitcoinGUI::gotoCreatePcodePage()
{
createPcodeAction->setChecked(true);
if (walletFrame) walletFrame->gotoCreatePcodePage();
}

void BitcoinGUI::gotoSendCoinsPage(QString addr)
{
sendCoinsAction->setChecked(true);
Expand Down Expand Up @@ -1350,14 +1329,6 @@ void BitcoinGUI::updateLelantusPage()
checkLelantusVisibility(blocks);
}

void BitcoinGUI::setRapAddressesVisible(bool checked)
{
#ifdef ENABLE_WALLET
gotoOverviewPage();
#endif // ENABLE_WALLET
createPcodeAction->setVisible(checked);
}

static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
{
bool modal = (style & CClientUIInterface::MODAL);
Expand Down
5 changes: 0 additions & 5 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class BitcoinGUI : public QMainWindow
QAction *showHelpMessageAction;
QAction *lelantusAction;
QAction *masternodeAction;
QAction *createPcodeAction;
QAction *logoAction;

QSystemTrayIcon *trayIcon;
Expand Down Expand Up @@ -218,8 +217,6 @@ public Q_SLOTS:
void gotoMasternodePage();
/** Switch to receive coins page */
void gotoReceiveCoinsPage();
/** Switch to create payment code page */
void gotoCreatePcodePage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");
/** Switch to lelantus page */
Expand Down Expand Up @@ -275,8 +272,6 @@ public Q_SLOTS:
/** Update Lelantus page visibility */
void updateLelantusPage();

/** Update RAP Addresses page visibility */
void setRapAddressesVisible(bool);
};

class UnitDisplayStatusBarControl : public QLabel
Expand Down
237 changes: 0 additions & 237 deletions src/qt/createpcodedialog.cpp

This file was deleted.

Loading

0 comments on commit f55383c

Please sign in to comment.