summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcitems.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-14 19:06:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-14 19:06:59 +0000
commite3ffab889d900847fa6fb9807bc5f818da28c358 (patch)
tree5722d206bdaeaec951c1c293bb671cd7347ebad7 /plugins/Clist_modern/src/modern_clcitems.cpp
parente2e713063780dd623c8025b6f4762c1e32bc784d (diff)
much less crazy way to organize clist data
git-svn-id: http://svn.miranda-ng.org/main/trunk@973 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcitems.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 7a29b5e82a..1da4ce23c2 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -240,7 +240,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,struct ClcGroup
if (group == NULL) return NULL;
if (dat == NULL) return NULL;
hContact = cacheEntry->hContact;
- dat->NeedResort = 1;
+ dat->needsResort = 1;
for (i = group->cl.count-1;i >= 0;i--)
if (group->cl.items[i]->type != CLCIT_INFO || !(group->cl.items[i]->flags&CLCIIF_BELOWCONTACTS)) break;
i = cli_AddItemToGroup(group,i+1);
@@ -304,7 +304,7 @@ void cli_DeleteItemFromTree(HWND hwnd,HANDLE hItem)
//check here contacts are not resorting
if (hwnd == pcli->hwndContactTree)
pcli->pfnFreeCacheItem(pcli->pfnGetCacheEntry(hItem));
- dat->NeedResort = 1;
+ dat->needsResort = 1;
ClearRowByIndexCache();
}
@@ -375,7 +375,7 @@ void cliRebuildEntireList(HWND hwnd,struct ClcData *dat)
dat->list.hideOffline = db_get_b(NULL,"CLC","HideOfflineRoot",SETTING_HIDEOFFLINEATROOT_DEFAULT) && style&CLS_USEGROUPS;
dat->list.cl.count = dat->list.cl.limit = 0;
dat->list.cl.increment = 50;
- dat->NeedResort = 1;
+ dat->needsResort = 1;
HANDLE hSelected = SaveSelection( dat );
dat->selection = -1;
@@ -541,7 +541,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat)
KillTimer(hwnd, TIMERID_RENAME);
pcli->pfnEndRename(hwnd, dat, 1);
- dat->NeedResort = 1;
+ dat->needsResort = 1;
group = &dat->list;
group->scanIndex = 0;
for (;;) {
@@ -757,10 +757,15 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc
PDNCE pdnce = (PDNCE)pcli->pfnGetCacheEntry(hContact);
BOOL fEmbedded = dat->force_in_dialog;
// always hide subcontacts (but show them on embedded contact lists)
-
+
+ if (dat->filterSearch && dat->szQuickSearch) {
+ // search filtering
+ return _tcsnicmp(dat->szQuickSearch, pdnce->tszName, lstrlen(dat->szQuickSearch));
+ //return _tcsstr(CharLowerW(pdnce->tszName), CharLowerW(dat->szQuickSearch)) ? 0 : 1; // this will search in whole string, but highlighting isn't supporting it...
+ }
if (g_CluiData.bMetaAvail && dat != NULL && dat->IsMetaContactsEnabled && g_szMetaModuleName && db_get_b(hContact, g_szMetaModuleName, "IsSubcontact", 0))
return -1; //subcontact
- if (pdnce && pdnce->isUnknown && !fEmbedded)
+ if (pdnce && pdnce->isUnknown && !fEmbedded)
return 1; //'Unknown Contact'
if (pdnce && g_CluiData.bFilterEffective && !fEmbedded)
{