aboutsummaryrefslogtreecommitdiff
path: root/src/qt/overviewpage.cpp
diff options
context:
space:
mode:
authorPatrick Lodder <[email protected]>2021-07-22 22:44:32 +0200
committerGitHub <[email protected]>2021-07-22 22:44:32 +0200
commitdad797d01b134a6dd663b4e749093da3ef09fa40 (patch)
treec0da1caa7e8f678f6e81598b51509bcd6f407d79 /src/qt/overviewpage.cpp
parentMerge pull request #2413 from dogecoin/revert-2342-issue-2340-depends-build-d... (diff)
parentAdd tips section (diff)
downloaddiscoin-dad797d01b134a6dd663b4e749093da3ef09fa40.tar.xz
discoin-dad797d01b134a6dd663b4e749093da3ef09fa40.zip
Merge pull request #2308 from alamshafil/doge-tips
[QT] Add tips section
Diffstat (limited to 'src/qt/overviewpage.cpp')
-rw-r--r--src/qt/overviewpage.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index ba344f4db..cd879002e 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -129,6 +129,9 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)
ui->labelTransactionsStatus->setIcon(icon);
ui->labelWalletStatus->setIcon(icon);
+ // Set tip of the day
+ UpdateTip();
+
// Recent transactions
ui->listTransactions->setItemDelegate(txdelegate);
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
@@ -143,6 +146,25 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)
connect(ui->labelTransactionsStatus, SIGNAL(clicked()), this, SLOT(handleOutOfSyncWarningClicks()));
}
+void OverviewPage::UpdateTip()
+{
+ QStringList tips = {
+ tr("Never share your wallet.dat file/your private key with anyone"),
+ tr("For more advanced settings use the console in 'Help' -> 'Debug Window'"),
+ tr("Encrypt your wallet with a strong passphrase for maximum security"),
+ tr("Make sure to keep your wallet updated."),
+ tr("Backup your private key to recover your coins, using 'File' > 'Backup Wallet'"),
+ tr("Always do your own research before using an external cryptocurrency service"),
+ tr("Never share your private key to an untrustworthy person."),
+ tr("Who own the private keys own the coins."),
+ tr("To see ongoing development and contribute, checkout Dogecoin repository on GitHub!"),
+ tr("Services that claim to double your dogecoins are always ponzi schemes")
+ };
+
+ int i = rand() % tips.length();
+ ui->label_tip->setText(tips[i]);
+}
+
void OverviewPage::handleTransactionClicked(const QModelIndex &index)
{
if(filter)