summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcidents.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-23 14:46:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-23 14:46:56 +0000
commit286f6d8ed325ca5f726e6ba5fad86fb834d51c16 (patch)
tree748642f7c8d719842070cfdcbb124438b86d6eed /plugins/Clist_modern/src/modern_clcidents.cpp
parent439c6760bf51d44e22b7147d54e1f38ce8e1dbab (diff)
fix for wrongly named variables
git-svn-id: http://svn.miranda-ng.org/main/trunk@16865 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcidents.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcidents.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp
index 2f10f3306f..8afc03b8b6 100644
--- a/plugins/Clist_modern/src/modern_clcidents.cpp
+++ b/plugins/Clist_modern/src/modern_clcidents.cpp
@@ -37,7 +37,7 @@ int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex)
{
int count = 0;
int subcontactscount = 0;
- BYTE k = db_get_b(NULL, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT);
+ bool bMetaExpanding = db_get_b(NULL, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) != 0;
group->scanIndex = 0;
for (;;) {
if (group->scanIndex == group->cl.count) {
@@ -61,16 +61,16 @@ int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex)
continue;
}
}
+ int iRows = (bMetaExpanding && c->bSubExpanded) ? c->iSubAllocated : 0;
if (group == subgroup) {
- if (c->type == CLCIT_CONTACT && c->SubAllocated) {
- int rows = (c->SubAllocated*c->SubExpanded*k);
- if (group->scanIndex + rows >= contactIndex)
+ if (c->type == CLCIT_CONTACT && c->iSubAllocated) {
+ if (group->scanIndex + iRows >= contactIndex)
return count + (contactIndex - group->scanIndex) - 1;
}
}
if (c->type == CLCIT_CONTACT) {
- count += (c->SubAllocated * c->SubExpanded * k);
- subcontactscount += (c->SubAllocated * c->SubExpanded * k);
+ count += iRows;
+ subcontactscount += iRows;
}
group->scanIndex++;
}
@@ -134,8 +134,8 @@ int FindItem(HWND hwnd, ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGro
return 1;
}
- if (!isIgnoreSubcontacts && IsHContactContact(dwItem) && c->type == CLCIT_CONTACT && c->SubAllocated > 0) {
- for (int i = 0; i < c->SubAllocated; i++) {
+ if (!isIgnoreSubcontacts && IsHContactContact(dwItem) && c->type == CLCIT_CONTACT && c->iSubAllocated > 0) {
+ for (int i = 0; i < c->iSubAllocated; i++) {
if (c->subcontacts[i].hContact == dwItem) {
if (contact) *contact = &c->subcontacts[i];
if (subgroup) *subgroup = group;
@@ -183,9 +183,9 @@ int cliGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup
}
if (c->type == CLCIT_CONTACT)
- if (c->SubAllocated)
- if (c->SubExpanded && dat->expandMeta) {
- for (i = 0; i < c->SubAllocated; i++) {
+ if (c->iSubAllocated)
+ if (c->bSubExpanded && dat->expandMeta) {
+ for (i = 0; i < c->iSubAllocated; i++) {
index++;
if (testindex == index) {
if (contact) {