Repository: dogecoin/dogecoin
File: src/qt/overviewpage.cpp (C++)

Code before:
    ui->labelWalletStatus->setIcon(icon);

    //set the current version
    ui->label_wallet_version_overlay->setText(QString::fromStdString(FormatFullVersion()));

    // Set tip of the day
    UpdateTip();

    // Recent transactions
    ui->listTransactions->setItemDelegate(txdelegate);
    ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
    ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
    ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);

    connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex)));

    // start with displaying the "out of sync" warnings
    showOutOfSyncWarning(true);
    connect(ui->labelWalletStatus, SIGNAL(clicked()), this, SLOT(handleOutOfSyncWarningClicks()));
    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 with anyone"),
        tr("Who owns the private keys owns 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)
        Q_EMIT transactionClicked(filter->mapToSource(index));
}

void OverviewPage::handleOutOfSyncWarningClicks()
{
    Q_EMIT outOfSyncWarningClicked();
}

Review comment (suggestion):
I don't feel strongly about this, but I agree that users should not share their wallet files or private keys with anyone they don't want to have access to their transactions.

Are we losing any important nuance by dropping the mention of "your private key"?

(I think it's a mistake to get into the nuance of *why* you might provide emergency access to your wallet here, for what it's worth.The phrasing in a tip here is fine with me as it is.)

Code after:
    ui->labelWalletStatus->setIcon(icon);

    //set the current version
    ui->label_wallet_version_overlay->setText(QString::fromStdString(FormatFullVersion()));

    // Set tip of the day
    UpdateTip();

    // Recent transactions
    ui->listTransactions->setItemDelegate(txdelegate);
    ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
    ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
    ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);

    connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex)));

    // start with displaying the "out of sync" warnings
    showOutOfSyncWarning(true);
    connect(ui->labelWalletStatus, SIGNAL(clicked()), this, SLOT(handleOutOfSyncWarningClicks()));
    connect(ui->labelTransactionsStatus, SIGNAL(clicked()), this, SLOT(handleOutOfSyncWarningClicks()));
}

void OverviewPage::UpdateTip()
{
    QStringList tips = {
        tr("Never share your wallet.dat file with anyone"),
        tr("For advanced operations, 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 software 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 with anyone"),
        tr("Who owns the private keys, owns the coins"),
        tr("To see ongoing development and contribute, check out the Dogecoin Core 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)
        Q_EMIT transactionClicked(filter->mapToSource(index));
}

void OverviewPage::handleOutOfSyncWarningClicks()
{
    Q_EMIT outOfSyncWarningClicked();
}