diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-20 17:28:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-20 17:28:57 +0000 |
commit | f7f1dc1982eec1802b501429dc5820d2ff898fc8 (patch) | |
tree | b81e348786e503e803dc46fbad60b09990ccc7cb /src/modules/clist/clc.cpp | |
parent | 3ccf3859a69cd7515f47bf4d3d5afb91c5d1c630 (diff) |
minor code cleaning for the clist filtering
git-svn-id: http://svn.miranda-ng.org/main/trunk@1085 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/clc.cpp')
-rw-r--r-- | src/modules/clist/clc.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp index 49b8dd6870..a46879aaad 100644 --- a/src/modules/clist/clc.cpp +++ b/src/modules/clist/clc.cpp @@ -782,11 +782,8 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, return 0;
}
if (selMoved) {
- if (dat->filterSearch) {
- // this shouldn't clear filtering, but it should refresh highlighting somehow?
- } else {
+ if ( !dat->filterSearch)
dat->szQuickSearch[0] = 0;
- }
if (dat->selection >= cli.pfnGetGroupContentsCount(&dat->list, 1))
dat->selection = cli.pfnGetGroupContentsCount(&dat->list, 1) - 1;
if (dat->selection < 0)
@@ -838,10 +835,9 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, _tcscat(dat->szQuickSearch, szNew);
}
- if (dat->filterSearch) {
+ if (dat->filterSearch)
cli.pfnSaveStateAndRebuildList(hwnd, dat);
- //cli.pfnRebuildEntireList(hwnd, dat);
- }
+
if (dat->szQuickSearch[0]) {
int index;
index = cli.pfnFindRowByText(hwnd, dat, dat->szQuickSearch, 1);
@@ -944,11 +940,8 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, cli.pfnEndRename(hwnd, dat, 1);
dat->ptDragStart.x = (short) LOWORD(lParam);
dat->ptDragStart.y = (short) HIWORD(lParam);
- if (dat->filterSearch) {
- // this shouldn't clear filtering, but it should refresh highlighting somehow?
- } else {
+ if ( !dat->filterSearch)
dat->szQuickSearch[0] = 0;
- }
hit = cli.pfnHitTest(hwnd, dat, (short) LOWORD(lParam), (short) HIWORD(lParam), &contact, &group, &hitFlags);
if (hit != -1) {
if (hit == dat->selection && hitFlags & CLCHT_ONITEMLABEL && dat->exStyle & CLS_EX_EDITLABELS) {
@@ -1257,11 +1250,8 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (GetFocus() != hwnd)
SetFocus(hwnd);
dat->iHotTrack = -1;
- if (dat->filterSearch) {
- // this shouldn't remove filtering
- } else {
+ if (!dat->filterSearch)
dat->szQuickSearch[0] = 0;
- }
pt.x = (short) LOWORD(lParam);
pt.y = (short) HIWORD(lParam);
if (pt.x == -1 && pt.y == -1) {
|