summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-15 17:10:52 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-15 17:10:52 +0300
commitd765974505c971a73de6fc6c0b615915ce3f0282 (patch)
treee821b0a452f52b2bf30e9e63eb6fc9fdfb325da9 /plugins/NotesAndReminders
parent6c1d7f07bc393c8064fcfbd33b307fc619e4c6e0 (diff)
fixes #3927 (Убрать чувствительность к регистру в поиске NotesReminders)
Diffstat (limited to 'plugins/NotesAndReminders')
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index 895ae9af79..9759e1873b 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -1526,9 +1526,11 @@ class CReminderListDlg : public CDlgBase
int i = 0;
for (auto &pReminder : arReminders) {
- if (!m_wszFilter.IsEmpty())
- if (pReminder->wszText.Find(m_wszFilter, 0) == -1)
+ if (!m_wszFilter.IsEmpty()) {
+ CMStringW str = pReminder->wszText;
+ if (str.MakeLower().Find(m_wszFilter, 0) == -1)
continue;
+ }
LV_ITEM lvTIt;
lvTIt.mask = LVIF_TEXT | LVIF_PARAM;
@@ -1628,6 +1630,18 @@ public:
pListDialog = nullptr;
}
+ void OnResize() override
+ {
+ CSuper::OnResize();
+
+ RECT rc;
+ GetWindowRect(m_list.GetHwnd(), &rc);
+ int nWidth = rc.right - rc.left - m_list.GetColumnWidth(0) - 4;
+ if (GetWindowLong(m_list.GetHwnd(), GWL_STYLE) & WS_VSCROLL)
+ nWidth -= GetSystemMetrics(SM_CXVSCROLL);
+ m_list.SetColumnWidth(1, nWidth);
+ }
+
int Resizer(UTILRESIZECONTROL *urc) override
{
switch (urc->wId) {
@@ -1728,6 +1742,7 @@ public:
void onChange_Filter(CCtrlEdit *)
{
m_wszFilter = ptrW(edtFilter.GetText());
+ m_wszFilter.MakeLower();
RefreshList();
}
@@ -1745,16 +1760,6 @@ public:
}
}
break;
-
- case WM_SIZE:
- CSuper::DlgProc(msg, wParam, lParam);
-
- GetWindowRect(m_list.GetHwnd(), &rc);
- int nWidth = rc.right - rc.left - m_list.GetColumnWidth(0) - 4;
- if (GetWindowLong(m_list.GetHwnd(), GWL_STYLE) & WS_VSCROLL)
- nWidth -= GetSystemMetrics(SM_CXVSCROLL);
- m_list.SetColumnWidth(1, nWidth);
- return 0;
}
return CSuper::DlgProc(msg, wParam, lParam);