diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-07-19 10:37:35 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-07-19 10:37:35 +0000 |
commit | 41ca8e063b7948356854ae6a6f26c7550a940a41 (patch) | |
tree | 0d82931c7842cb81e002a4798842fad6fe2b5163 /plugins/Clist_modern/src/modern_clcutils.cpp | |
parent | 3b94f5999249803fde203c39e46c613d1658b704 (diff) |
Improved searching feature and related things.
git-svn-id: http://svn.miranda-ng.org/main/trunk@1041 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcutils.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcutils.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index efd26e437c..4fb314fb12 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -822,8 +822,12 @@ int cliFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int pref contact = group->cl.items[group->scanIndex];
if (contact->type != CLCIT_DIVIDER)
{
- if ((prefixOk && !_tcsnicmp(text, contact->szText, testlen)) ||
- (!prefixOk && !lstrcmpi(text, contact->szText)))
+ TCHAR* lowered = CharLowerW(NEWTSTR_ALLOCA(contact->szText));
+ TCHAR* lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
+ if (_tcsstr(lowered, lowered_text))
+
+ /*if ((prefixOk && !_tcsnicmp(text, contact->szText, testlen)) ||
+ (!prefixOk && !lstrcmpi(text, contact->szText))) */
{
struct ClcGroup *contactGroup = group;
int contactScanIndex = group->scanIndex;
@@ -849,8 +853,12 @@ int cliFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int pref for (i=0; i < contact->SubAllocated; i++)
{
struct ClcContact * subcontact = &(contact->subcontacts[i]);
- if ((prefixOk && !_tcsnicmp(text, subcontact->szText, testlen)) ||
- (!prefixOk && !lstrcmpi(text, subcontact->szText)))
+
+ TCHAR* lowered = CharLowerW(NEWTSTR_ALLOCA(subcontact->szText));
+ TCHAR* lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
+ if (_tcsstr(lowered, lowered_text))
+/* if ((prefixOk && !_tcsnicmp(text, subcontact->szText, testlen)) ||
+ (!prefixOk && !lstrcmpi(text, subcontact->szText))) */
{
struct ClcGroup *contactGroup = group;
int contactScanIndex = group->scanIndex;
|