Skip to content

Commit

Permalink
Merge pull request moneymanagerex#7095 from georgeef/new_panel-sn-2
Browse files Browse the repository at this point in the history
add tip for SN in transactions panel
  • Loading branch information
whalley authored Jan 6, 2025
2 parents e5540ca + 1f8df59 commit 47b07a0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mmchecking_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,12 @@ void TransactionListCtrl::sortTable()
m_columns[prev_g_sortcol].HEADER, prev_g_asc ? L"\u25B2" : L"\u25BC"
);
m_cp->m_header_sortOrder->SetLabelText(sortText);


if (m_real_columns[g_sortcol] == COL_SN)
m_cp->showTips(_("SN (Sequence Number) has the same order as Date/ID."));
else if (m_real_columns[g_sortcol] == COL_ID)
m_cp->showTips(_("ID (identification number) is increasing with the time of creation in the database."));

RefreshItems(0, m_trans.size() - 1);
}

Expand Down
14 changes: 14 additions & 0 deletions src/mmcheckingpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,11 @@ void mmCheckingPanel::updateExtraTransactionData(bool single, int repeat_num, bo

void mmCheckingPanel::showTips()
{
if (m_show_tips) {
m_show_tips = false;
return;
}

if (Option::instance().getShowMoneyTips())
m_info_panel->SetLabelText(
wxGetTranslation(wxString::FromUTF8(
Expand All @@ -932,6 +937,15 @@ void mmCheckingPanel::showTips()
else
m_info_panel->SetLabelText("");
}

void mmCheckingPanel::showTips(const wxString& tip)
{
if (Option::instance().getShowMoneyTips())
m_info_panel->SetLabelText(tip);
else
m_info_panel->SetLabelText("");
m_show_tips = true;
}
//----------------------------------------------------------------------------

void mmCheckingPanel::OnDeleteTransaction(wxCommandEvent& event)
Expand Down
2 changes: 2 additions & 0 deletions src/mmcheckingpanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class mmCheckingPanel : public mmPanelBase
double m_account_balance = 0.0;
double m_account_reconciled = 0.0;
bool m_show_reconciled;
bool m_show_tips = false;
TransactionListCtrl* m_listCtrlAccount = nullptr;

int64 m_account_id = -1; // applicable if m_checking_id >= 1
Expand Down Expand Up @@ -180,6 +181,7 @@ class mmCheckingPanel : public mmPanelBase

/* updates the checking panel data */
void showTips();
void showTips(const wxString& tip);
void updateScheduledToolTip();
void updateExtraTransactionData(bool single, int repeat_num, bool foreign);
void enableButtons(bool edit, bool dup, bool del, bool enter, bool skip, bool attach);
Expand Down

0 comments on commit 47b07a0

Please sign in to comment.