Skip to content

Commit f1af623

Browse files
committed
privacy widget update action btn text
1 parent aa76c5d commit f1af623

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/qt/pivx/privacywidget.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ PrivacyWidget::PrivacyWidget(PIVXGUI* _window, QWidget *parent) :
129129

130130
// Buttons
131131

132-
ui->pushButtonSave->setText("Mint to zPIV");
133132
ui->pushButtonSave->setProperty("cssClass", "btn-primary");
133+
onMintSelected(true);
134134

135135
ui->btnTotalzPIV->setTitleClassAndText("btn-title-grey", "Total zPIV 1000");
136136
ui->btnTotalzPIV->setSubTitleClassAndText("text-subtitle", "Show own coins denominations.");
@@ -155,6 +155,8 @@ PrivacyWidget::PrivacyWidget(PIVXGUI* _window, QWidget *parent) :
155155
connect(ui->btnRescanMints, SIGNAL(clicked()), this, SLOT(onRescanMintsClicked()));
156156
connect(ui->btnResetZerocoin, SIGNAL(clicked()), this, SLOT(onResetZeroClicked()));
157157

158+
connect(ui->pushLeft, &QPushButton::clicked, [this](){onMintSelected(false);});
159+
connect(ui->pushRight, &QPushButton::clicked, [this](){onMintSelected(true);});
158160
// Style
159161
connect(window, SIGNAL(themeChanged(bool, QString&)), this, SLOT(changeTheme(bool, QString&)));
160162

@@ -205,6 +207,17 @@ void PrivacyWidget::setWalletModel(WalletModel* _model){
205207

206208
}
207209

210+
void PrivacyWidget::onMintSelected(bool isMint){
211+
// TODO: Complete me..
212+
QString btnText;
213+
if(isMint){
214+
btnText = tr("Mint zPIV");
215+
}else{
216+
btnText = tr("Convert back to PIV");
217+
}
218+
ui->pushButtonSave->setText(btnText);
219+
}
220+
208221
void PrivacyWidget::updateDisplayUnit() {
209222
if (walletModel && walletModel->getOptionsModel()) {
210223
nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();

src/qt/pivx/privacywidget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ private slots:
3939
void updateDisplayUnit();
4040
void showList();
4141
void onSendClicked();
42+
void onMintSelected(bool isMint);
4243

4344
signals:
4445
void message(const QString& title, const QString& message, unsigned int style);

0 commit comments

Comments
 (0)