summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcidents.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-06 21:41:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-06 21:41:06 +0000
commitf11a71a26ce00c5fc5cdd4350b1303ed7bed9ad5 (patch)
tree797910f4c5f12392bc09ce90ae3099dc28a0385f /plugins/Clist_modern/src/modern_clcidents.cpp
parentf078926d87c9a272ec9588572d0ec1f53e9b1e2b (diff)
clist_modern:
- functions ContactToHItem & ContactToItemHandle replaced with their kernel implementations; - dat->row_heights array isn't used when the row height is constant; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcidents.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcidents.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp
index d22ac3a75f..12712894bd 100644
--- a/plugins/Clist_modern/src/modern_clcidents.cpp
+++ b/plugins/Clist_modern/src/modern_clcidents.cpp
@@ -24,23 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-/* the CLC uses 3 different ways to identify elements in its list, this file
-contains routines to convert between them.
-
-1) ClcContact/ClcGroup pair. Only ever used within the duration
-of a single operation, but used at some point in nearly everything
-2) index integer. The 0-based number of the item from the top. Only visible
-items are counted (ie not closed groups). Used for saving selection and drag
-highlight
-3) hItem handle. Either the hContact or (hGroup|HCONTACT_ISGROUP). Used
-exclusively externally
-
-1->2: cliGetRowsPriorTo()
-1->3: ContactToHItem()
-3->1: FindItem()
-2->1: GetRowByIndex()
-*/
-
int GetContactIndex(ClcGroup *group, ClcContact *contact)
{
for (int i = 0; i < group->cl.count; i++)
@@ -226,31 +209,3 @@ int cliGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup
}
return -1;
}
-
-HANDLE ContactToHItem(ClcContact *contact)
-{
- switch (contact->type) {
- case CLCIT_CONTACT:
- return (HANDLE)contact->hContact;
- case CLCIT_GROUP:
- return (HANDLE)(contact->groupId | HCONTACT_ISGROUP);
- case CLCIT_INFO:
- return (HANDLE)((DWORD_PTR)contact->hContact | HCONTACT_ISINFO);
- }
- return NULL;
-}
-
-HANDLE ContactToItemHandle(ClcContact *contact, DWORD *nmFlags)
-{
- switch (contact->type) {
- case CLCIT_CONTACT:
- return (HANDLE)contact->hContact;
- case CLCIT_GROUP:
- if (nmFlags) *nmFlags |= CLNF_ISGROUP;
- return (HANDLE)contact->groupId;
- case CLCIT_INFO:
- if (nmFlags) *nmFlags |= CLNF_ISINFO;
- return (HANDLE)((DWORD_PTR)contact->hContact | HCONTACT_ISINFO);
- }
- return NULL;
-} \ No newline at end of file