Skip to content

Commit

Permalink
Update gui wallet (#2)
Browse files Browse the repository at this point in the history
* Fix bug on interface

* Light theme

* Rebranding privatePAC and instantPAC
  • Loading branch information
devfsc authored and alejandromgk committed Jan 26, 2018
1 parent bfc4631 commit 922c8d3
Show file tree
Hide file tree
Showing 19 changed files with 158 additions and 120 deletions.
4 changes: 2 additions & 2 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ void BitcoinGUI::createActions()
showHelpMessageAction->setMenuRole(QAction::NoRole);
showHelpMessageAction->setStatusTip(tr("Show the $PAC Core help message to get a list with possible $PAC Core command-line options"));

showPrivateSendHelpAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&PrivateSend information"), this);
showPrivateSendHelpAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&PrivatePAC information"), this);
showPrivateSendHelpAction->setMenuRole(QAction::NoRole);
showPrivateSendHelpAction->setStatusTip(tr("Show the PrivateSend basic information"));
showPrivateSendHelpAction->setStatusTip(tr("Show the PrivatePAC basic information"));

connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
Expand Down
2 changes: 1 addition & 1 deletion src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
int nRounds = pwalletMain->GetOutpointPrivateSendRounds(outpt);
if (coinControl->fUsePrivateSend && nRounds < privateSendClient.nPrivateSendRounds) {
QMessageBox::warning(this, windowTitle(),
tr("Non-anonymized input selected. <b>PrivateSend will be disabled.</b><br><br>If you still want to use PrivateSend, please deselect all non-nonymized inputs first and then check PrivateSend checkbox again."),
tr("Non-anonymized input selected. <b>PrivatePAC will be disabled.</b><br><br>If you still want to use PrivatePAC, please deselect all non-nonymized inputs first and then check PrivatePAC checkbox again."),
QMessageBox::Ok, QMessageBox::Ok);
coinControl->fUsePrivateSend = false;
}
Expand Down
14 changes: 7 additions & 7 deletions src/qt/darksendconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ void DarksendConfig::clickBasic()

QString strAmount(BitcoinUnits::formatWithUnit(
model->getOptionsModel()->getDisplayUnit(), 100000 * COIN));
QMessageBox::information(this, tr("PrivateSend Configuration"),
QMessageBox::information(this, tr("PrivatePAC Configuration"),
tr(
"PrivateSend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening $PAC's configuration screen."
"PrivatePAC was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening $PAC's configuration screen."
).arg(strAmount)
);

Expand All @@ -55,9 +55,9 @@ void DarksendConfig::clickHigh()

QString strAmount(BitcoinUnits::formatWithUnit(
model->getOptionsModel()->getDisplayUnit(), 100000 * COIN));
QMessageBox::information(this, tr("PrivateSend Configuration"),
QMessageBox::information(this, tr("PrivatePAC Configuration"),
tr(
"PrivateSend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening $PAC's configuration screen."
"PrivatePAC was successfully set to high (%1 and 8 rounds). You can change this at any time by opening $PAC's configuration screen."
).arg(strAmount)
);

Expand All @@ -72,7 +72,7 @@ void DarksendConfig::clickMax()
model->getOptionsModel()->getDisplayUnit(), 100000 * COIN));
QMessageBox::information(this, tr("PrivateSend Configuration"),
tr(
"PrivateSend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening $PAC's configuration screen."
"PrivatePAC was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening $PAC's configuration screen."
).arg(strAmount)
);

Expand All @@ -83,8 +83,8 @@ void DarksendConfig::configure(bool enabled, int coins, int rounds) {

QSettings settings;

settings.setValue("nPrivateSendRounds", rounds);
settings.setValue("nPrivateSendAmount", coins);
settings.setValue("nPrivatePACRounds", rounds);
settings.setValue("nPrivatePACAmount", coins);

privateSendClient.nPrivateSendRounds = rounds;
privateSendClient.nPrivateSendAmount = coins;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/forms/masternodelist.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>968</width>
<height>433</height>
<height>409</height>
</rect>
</property>
<property name="windowTitle">
Expand Down
6 changes: 3 additions & 3 deletions src/qt/forms/modaloverlay.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>640</width>
<height>401</height>
<height>382</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -128,7 +128,7 @@
<item>
<widget class="QLabel" name="infoText">
<property name="text">
<string>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the Paccoin network, as detailed below.</string>
<string>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the $PAC network, as detailed below.</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
Expand All @@ -147,7 +147,7 @@
</font>
</property>
<property name="text">
<string>Attempting to spend Paccoin that are affected by not-yet-displayed transactions will not be accepted by the network.</string>
<string>Attempting to spend $PAC that are affected by not-yet-displayed transactions will not be accepted by the network.</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
Expand Down
28 changes: 16 additions & 12 deletions src/qt/forms/overviewpage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,23 @@
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string> Balances</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelWalletStatus">
<property name="toolTip">
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Paccoin network after a connection is established, but this process has not completed yet.</string>
<property name="statusTip">
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the $PAC network after a connection is established, but this process has not completed yet.</string>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
<string notr="true">QLabel { color: transparent; }</string>
</property>
<property name="text">
<string notr="true">(out of sync)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<string/>
</property>
</widget>
</item>
Expand Down Expand Up @@ -405,7 +409,7 @@
</font>
</property>
<property name="text">
<string>PrivateSend</string>
<string>PrivatePAC</string>
</property>
</widget>
</item>
Expand All @@ -415,7 +419,7 @@
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Paccoin network after a connection is established, but this process has not completed yet.</string>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
<string notr="true">QLabel { color: transparent; }</string>
</property>
<property name="text">
<string notr="true">(out of sync)</string>
Expand Down Expand Up @@ -501,7 +505,7 @@
</font>
</property>
<property name="text">
<string notr="true">0 PAC</string>
<string notr="true">0 $PAC</string>
</property>
</widget>
</item>
Expand All @@ -515,7 +519,7 @@
<item row="3" column="1">
<widget class="QLabel" name="labelAmountRounds">
<property name="text">
<string>0 PAC / 0 Rounds</string>
<string>0 $PAC / 0 Rounds</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -674,7 +678,7 @@
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Paccoin network after a connection is established, but this process has not completed yet.</string>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
<string notr="true">QLabel { color: transparent; }</string>
</property>
<property name="text">
<string notr="true">(out of sync)</string>
Expand Down
10 changes: 8 additions & 2 deletions src/qt/forms/receivecoinsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>776</width>
<height>387</height>
<width>1550</width>
<height>438</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1">
Expand Down Expand Up @@ -241,6 +241,12 @@
</item>
<item>
<widget class="QTableView" name="recentRequestsView">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
Expand Down
14 changes: 7 additions & 7 deletions src/qt/forms/sendcoinsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>850</width>
<height>526</height>
<height>584</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -411,7 +411,7 @@
</property>
</widget>
</item>
</layout>
</layout>
</item>
<item>
<layout class="QFormLayout" name="formLayoutCoinControl4">
Expand Down Expand Up @@ -587,8 +587,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>830</width>
<height>69</height>
<width>824</width>
<height>72</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
Expand Down Expand Up @@ -1295,7 +1295,7 @@
</size>
</property>
<property name="text">
<string>PrivateSend</string>
<string>PrivatePAC</string>
</property>
<property name="checked">
<bool>false</bool>
Expand All @@ -1314,7 +1314,7 @@
</size>
</property>
<property name="text">
<string>InstantSend</string>
<string>InstantPAC</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -1368,7 +1368,7 @@
</resources>
<connections/>
<buttongroups>
<buttongroup name="groupCustomFee"/>
<buttongroup name="groupFee"/>
<buttongroup name="groupCustomFee"/>
</buttongroups>
</ui>
36 changes: 18 additions & 18 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,28 +498,28 @@ void OverviewPage::privateSendStatus()
"saved in some safe place</span>!") + "<br><br>" +
tr("Note: You turn this message off in options.");
ui->labelPrivateSendEnabled->setToolTip(strWarn);
LogPrintf("OverviewPage::privateSendStatus -- Very low number of keys left since last automatic backup, warning user and trying to create new backup...\n");
QMessageBox::warning(this, tr("PrivateSend"), strWarn, QMessageBox::Ok, QMessageBox::Ok);
LogPrintf("OverviewPage::privatePACStatus -- Very low number of keys left since last automatic backup, warning user and trying to create new backup...\n");
QMessageBox::warning(this, tr("PrivatePAC"), strWarn, QMessageBox::Ok, QMessageBox::Ok);
} else {
LogPrintf("OverviewPage::privateSendStatus -- Very low number of keys left since last automatic backup, skipping warning and trying to create new backup...\n");
LogPrintf("OverviewPage::privatePACStatus -- Very low number of keys left since last automatic backup, skipping warning and trying to create new backup...\n");
}

std::string strBackupWarning;
std::string strBackupError;
if(!AutoBackupWallet(pwalletMain, "", strBackupWarning, strBackupError)) {
if (!strBackupWarning.empty()) {
// It's still more or less safe to continue but warn user anyway
LogPrintf("OverviewPage::privateSendStatus -- WARNING! Something went wrong on automatic backup: %s\n", strBackupWarning);
LogPrintf("OverviewPage::privatePACStatus -- WARNING! Something went wrong on automatic backup: %s\n", strBackupWarning);

QMessageBox::warning(this, tr("PrivateSend"),
QMessageBox::warning(this, tr("PrivatePAC"),
tr("WARNING! Something went wrong on automatic backup") + ":<br><br>" + strBackupWarning.c_str(),
QMessageBox::Ok, QMessageBox::Ok);
}
if (!strBackupError.empty()) {
// Things are really broken, warn user and stop mixing immediately
LogPrintf("OverviewPage::privateSendStatus -- ERROR! Failed to create automatic backup: %s\n", strBackupError);
LogPrintf("OverviewPage::privatePACStatus -- ERROR! Failed to create automatic backup: %s\n", strBackupError);

QMessageBox::warning(this, tr("PrivateSend"),
QMessageBox::warning(this, tr("PrivatePAC"),
tr("ERROR! Failed to create automatic backup") + ":<br><br>" + strBackupError.c_str() + "<br>" +
tr("Mixing is disabled, please close your wallet and fix the issue!"),
QMessageBox::Ok, QMessageBox::Ok);
Expand Down Expand Up @@ -557,10 +557,10 @@ void OverviewPage::privateSendStatus()

QString strStatus = QString(privateSendClient.GetStatus().c_str());

QString s = tr("Last PrivateSend message:\n") + strStatus;
QString s = tr("Last PrivatePAC message:\n") + strStatus;

if(s != ui->labelPrivateSendLastMessage->text())
LogPrintf("OverviewPage::privateSendStatus -- Last PrivateSend message: %s\n", strStatus.toStdString());
LogPrintf("OverviewPage::privatePACStatus -- Last PrivatePAC message: %s\n", strStatus.toStdString());

ui->labelPrivateSendLastMessage->setText(s);

Expand All @@ -580,8 +580,8 @@ void OverviewPage::privateSendAuto(){
void OverviewPage::privateSendReset(){
privateSendClient.ResetPool();

QMessageBox::warning(this, tr("PrivateSend"),
tr("PrivateSend was successfully reset."),
QMessageBox::warning(this, tr("PrivatePAC"),
tr("PrivatePAC was successfully reset."),
QMessageBox::Ok, QMessageBox::Ok);
}

Expand All @@ -595,17 +595,17 @@ void OverviewPage::togglePrivateSend(){
// Popup some information on first mixing
QString hasMixed = settings.value("hasMixed").toString();
if(hasMixed.isEmpty()){
QMessageBox::information(this, tr("PrivateSend"),
tr("If you don't want to see internal PrivateSend fees/transactions select \"Most Common\" as Type on the \"Transactions\" tab."),
QMessageBox::information(this, tr("PrivatePAC"),
tr("If you don't want to see internal PrivatePAC fees/transactions select \"Most Common\" as Type on the \"Transactions\" tab."),
QMessageBox::Ok, QMessageBox::Ok);
settings.setValue("hasMixed", "hasMixed");
}
if(!privateSendClient.fEnablePrivateSend){
const CAmount nMinAmount = CPrivateSend::GetSmallestDenomination() + CPrivateSend::GetMaxCollateralAmount();
if(currentBalance < nMinAmount){
QString strMinAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, nMinAmount));
QMessageBox::warning(this, tr("PrivateSend"),
tr("PrivateSend requires at least %1 to use.").arg(strMinAmount),
QMessageBox::warning(this, tr("PrivatePAC"),
tr("PrivatePAC requires at least %1 to use.").arg(strMinAmount),
QMessageBox::Ok, QMessageBox::Ok);
return;
}
Expand All @@ -618,10 +618,10 @@ void OverviewPage::togglePrivateSend(){
{
//unlock was cancelled
privateSendClient.nCachedNumBlocks = std::numeric_limits<int>::max();
QMessageBox::warning(this, tr("PrivateSend"),
tr("Wallet is locked and user declined to unlock. Disabling PrivateSend."),
QMessageBox::warning(this, tr("PrivatePAC"),
tr("Wallet is locked and user declined to unlock. Disabling PrivatePAC."),
QMessageBox::Ok, QMessageBox::Ok);
LogPrint("privatesend", "OverviewPage::togglePrivateSend -- Wallet is locked and user declined to unlock. Disabling PrivateSend.\n");
LogPrint("privatesend", "OverviewPage::togglePrivatePAC -- Wallet is locked and user declined to unlock. Disabling PrivatePAC.\n");
return;
}
}
Expand Down
Loading

0 comments on commit 922c8d3

Please sign in to comment.