From f226e87f979f06a0f9948873c4a846a1acecd23b Mon Sep 17 00:00:00 2001 From: George Ef Date: Mon, 6 Jan 2025 13:17:38 +0100 Subject: [PATCH 1/2] add tip for SN in transactions panel --- src/mmchecking_list.cpp | 6 +++++- src/mmcheckingpanel.cpp | 14 ++++++++++++++ src/mmcheckingpanel.h | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/mmchecking_list.cpp b/src/mmchecking_list.cpp index 623918048d..762225dfe8 100644 --- a/src/mmchecking_list.cpp +++ b/src/mmchecking_list.cpp @@ -245,7 +245,11 @@ 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_real_columns[prev_g_sortcol] == COL_SN) { + m_cp->showTips(_("SN (Sequence Number) has the same order as Date/ID.")); + } + RefreshItems(0, m_trans.size() - 1); } diff --git a/src/mmcheckingpanel.cpp b/src/mmcheckingpanel.cpp index ec7205edd7..4d97169632 100644 --- a/src/mmcheckingpanel.cpp +++ b/src/mmcheckingpanel.cpp @@ -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( @@ -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) diff --git a/src/mmcheckingpanel.h b/src/mmcheckingpanel.h index 3d92d2fdc3..ec0ab92294 100644 --- a/src/mmcheckingpanel.h +++ b/src/mmcheckingpanel.h @@ -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 @@ -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); From 1f8df597f4d57df2df158a90c0ae8570b00c119f Mon Sep 17 00:00:00 2001 From: George Ef Date: Mon, 6 Jan 2025 13:59:23 +0100 Subject: [PATCH 2/2] add tip for ID in transactions panel --- src/mmchecking_list.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mmchecking_list.cpp b/src/mmchecking_list.cpp index 762225dfe8..e054e6f267 100644 --- a/src/mmchecking_list.cpp +++ b/src/mmchecking_list.cpp @@ -246,9 +246,10 @@ void TransactionListCtrl::sortTable() ); m_cp->m_header_sortOrder->SetLabelText(sortText); - if (m_real_columns[g_sortcol] == COL_SN || m_real_columns[prev_g_sortcol] == COL_SN) { + 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); }