summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_contact.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-21 12:11:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-21 12:11:11 +0000
commit84c6ccfafbfe7b320443294ac78b3033774602cf (patch)
treed92c6f118c604944cad11fea006ba0aa20d8023f /plugins/Clist_modern/src/modern_contact.cpp
parent6dc45c41690e8d25757918256fbcb0a06db52f17 (diff)
proper file for the precompiled headers
git-svn-id: http://svn.miranda-ng.org/main/trunk@2415 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_contact.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp
index e1cc237e36..4f1de747b5 100644
--- a/plugins/Clist_modern/src/modern_contact.cpp
+++ b/plugins/Clist_modern/src/modern_contact.cpp
@@ -83,42 +83,41 @@ DWORD CompareContacts2_getLMTime(HANDLE hContact)
int GetProtoIndex(char * szName)
{
- PROTOACCOUNT **accs = NULL;
- int accCount = 0;
- int i;
- if ( !szName) return -1;
- ProtoEnumAccounts( &accCount, &accs );
- for (i=0; i < accCount; i++)
- if ( !mir_strcmpi(szName,accs[i]->szModuleName))
- return accs[i]->iOrder;
- return -1;
+ if (szName) {
+ PROTOACCOUNT **accs = NULL;
+ int accCount = 0;
+ ProtoEnumAccounts( &accCount, &accs );
+
+ for (int i=0; i < accCount; i++)
+ if ( !mir_strcmpi(szName, accs[i]->szModuleName))
+ return accs[i]->iOrder;
+ }
+
+ return -1;
}
int CompareContacts2(const ClcContact *contact1,const ClcContact *contact2, int by)
{
-
HANDLE a;
HANDLE b;
TCHAR *namea, *nameb;
int statusa,statusb;
char *szProto1,*szProto2;
-
+
if ((INT_PTR)contact1 < 100 || (INT_PTR)contact2 < 100) return 0;
-
+
a = contact1->hContact;
b = contact2->hContact;
-
+
namea = (TCHAR *)contact1->szText;
statusa = GetContactCachedStatus(contact1->hContact);
szProto1 = contact1->proto;
-
+
nameb = (TCHAR *)contact2->szText;
statusb = GetContactCachedStatus(contact2->hContact);
szProto2 = contact2->proto;
-
- if (by == SORTBY_STATUS)
- { //status
+ if (by == SORTBY_STATUS) { //status
int ordera,orderb;
ordera = GetStatusModeOrdering(statusa);
orderb = GetStatusModeOrdering(statusb);
@@ -191,7 +190,6 @@ INT_PTR ToggleHideOffline(WPARAM wParam,LPARAM lParam)
INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam)
{
-
db_set_b(NULL, "CList", "UseGroups",
(BYTE) !db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
pcli->pfnLoadContactTree();