diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-16 16:18:03 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-16 16:18:03 +0300 |
commit | 282f66c181a7413fb018eafe5c4aa8a7177259a2 (patch) | |
tree | 1799654813a6e4b433ba8eeea1b25b082e62b959 | |
parent | 23479372c8a8c86360b9c5031bd9fe8c33f3d499 (diff) |
code cleaning
-rw-r--r-- | include/delphi/m_clistint.inc | 47 | ||||
-rw-r--r-- | include/m_clistint.h | 4 | ||||
-rw-r--r-- | src/mir_app/src/clc.h | 3 | ||||
-rw-r--r-- | src/mir_app/src/clcitems.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 1 |
5 files changed, 8 insertions, 57 deletions
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc index fa7db4320f..a9a17828b7 100644 --- a/include/delphi/m_clistint.inc +++ b/include/delphi/m_clistint.inc @@ -37,53 +37,6 @@ type (* clc.h *)
pfnContactListControlWndProc : function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):LRESULT; stdcall;
-
- (* clcidents.c *)
- pfnFindItem : procedure; cdecl;
-
- pfnGetRowsPriorTo : procedure; cdecl;
- pfnGetRowByIndex : procedure; cdecl;
- pfnGetContactHiddenStatus : procedure; cdecl;
- pfnIsVisibleContact : procedure; cdecl;
-
- (* clcitems.c *)
- pfnCreateClcContact : procedure; cdecl;
- pfnAddGroup : procedure; cdecl;
-
- pfnFreeContact : procedure; cdecl;
-
- pfnAddInfoItemToGroup : procedure; cdecl;
- pfnAddItemToGroup : procedure; cdecl;
- pfnAddContactToGroup : procedure; cdecl;
-
- pfnAddContactToTree : procedure; cdecl;
- pfnRebuildEntireList : procedure; cdecl;
- pfnGetGroupContentsCount : procedure; cdecl;
- pfnSortCLC : procedure; cdecl;
-
- (* clcmsgs.c *)
- pfnProcessExternalMessages : procedure; cdecl;
-
- (* clcpaint.c *)
- pfnPaintClc : procedure; cdecl;
-
- (* clcutils.c *)
- pfnHitTest : procedure; cdecl;
- pfnScrollTo : procedure; cdecl;
- pfnRecalcScrollBar : procedure; cdecl;
- pfnSetGroupExpand : procedure; cdecl;
- pfnFindRowByText : procedure; cdecl;
- pfnBeginRenameSelection : procedure; cdecl;
- pfnGetDefaultFontSetting : procedure; cdecl;
- pfnLoadClcOptions : procedure; cdecl;
-
- pfnGetRowBottomY : procedure; cdecl;
- pfnGetRowHeight : procedure; cdecl;
- pfnGetRowTopY : procedure; cdecl;
- pfnGetRowTotalHeight : procedure; cdecl;
- pfnRowHitTest : procedure; cdecl;
-
- (* clistmod.c *)
pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:TMCONTACT):int; cdecl;
end;
diff --git a/include/m_clistint.h b/include/m_clistint.h index d0ba335ffd..93401834ae 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -319,6 +319,7 @@ struct CLIST_INTERFACE // clc.h
LRESULT (CALLBACK *pfnContactListControlWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ HICON (*pfnGetIconFromStatusMode)(MCONTACT hContact, const char *szProto, int status);
// clcidents.c
ClcContact* (*pfnFindItem)(uint32_t dwItem, ClcContact *contact);
@@ -335,7 +336,6 @@ struct CLIST_INTERFACE void (*pfnFreeContact)(ClcContact *contact);
ClcContact* (*pfnAddInfoItemToGroup)(ClcGroup *group, int flags, const wchar_t *pszText);
- ClcContact* (*pfnAddItemToGroup)(ClcGroup *group, int iAboveItem);
ClcContact* (*pfnAddContactToGroup)(ClcData *dat, ClcGroup *group, MCONTACT hContact);
void (*pfnAddContactToTree)(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline);
@@ -426,8 +426,6 @@ struct CLIST_INTERFACE wchar_t* szTip;
BOOL bTrayMenuOnScreen;
- HICON (*pfnGetIconFromStatusMode)(MCONTACT hContact, const char *szProto, int status);
-
int (*pfnTrayCalcChanged)(const char *szChangedProto, int averageMode, int iProtoCount);
int (*pfnTrayIconInit)(HWND hwnd);
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 36eb72eac1..9231e8cc18 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -56,9 +56,10 @@ ClcContact* fnFindItem(uint32_t dwItem, ClcContact *contact); ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers);
ClcContact* fnAddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText);
-ClcContact* fnAddItemToGroup(ClcGroup *group, int iAboveItem);
ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact);
+ClcContact* Clist_AddItemToGroup(ClcGroup *group, int iAboveItem);
+
void fnFreeContact(ClcContact *p);
void FreeGroup(ClcGroup *group);
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index bbae7dd65b..78402b8aa4 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -29,7 +29,7 @@ static ClcCacheEntry nullpce = {}; // routines for managing adding/removal of items in the list, including sorting
-ClcContact* fnAddItemToGroup(ClcGroup *group, int iAboveItem)
+ClcContact* Clist_AddItemToGroup(ClcGroup *group, int iAboveItem)
{
ClcContact* newItem = g_clistApi.pfnCreateClcContact();
newItem->type = CLCIT_DIVIDER;
@@ -87,7 +87,7 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, uint32_t fl if (groupId == 0)
return nullptr;
- ClcContact *cc = g_clistApi.pfnAddItemToGroup(group, i);
+ ClcContact *cc = Clist_AddItemToGroup(group, i);
cc->type = CLCIT_GROUP;
mir_wstrncpy(cc->szText, pThisField, _countof(cc->szText));
cc->groupId = (uint16_t)(pNextField ? 0 : groupId);
@@ -155,7 +155,7 @@ ClcContact* fnAddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszT if (group->cl[i]->type != CLCIT_INFO)
break;
- ClcContact *cc = g_clistApi.pfnAddItemToGroup(group, i);
+ ClcContact *cc = Clist_AddItemToGroup(group, i);
iInfoItemUniqueHandle = LOWORD(iInfoItemUniqueHandle + 1);
if (iInfoItemUniqueHandle == 0)
++iInfoItemUniqueHandle;
@@ -186,7 +186,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact ClcCacheEntry *pce = Clist_GetCacheEntry(hContact);
replaceStrW(pce->tszGroup, nullptr);
- ClcContact *cc = g_clistApi.pfnAddItemToGroup(group, index + 1);
+ ClcContact *cc = Clist_AddItemToGroup(group, index + 1);
cc->type = CLCIT_CONTACT;
cc->iImage = Clist_GetContactIcon(hContact);
cc->hContact = hContact;
@@ -539,7 +539,7 @@ static void SortGroup(ClcData *dat, ClcGroup *group, int useInsertionSort) prevContactOnline = 1;
else {
if (prevContactOnline) {
- ClcContact *cc = g_clistApi.pfnAddItemToGroup(group, i);
+ ClcContact *cc = Clist_AddItemToGroup(group, i);
cc->type = CLCIT_DIVIDER;
mir_wstrcpy(cc->szText, TranslateT("Offline"));
}
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index 7e39e2aec2..dd396d1b25 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -73,7 +73,6 @@ void InitClistCore() g_clistApi.pfnGetContactHiddenStatus = fnGetContactHiddenStatus;
g_clistApi.pfnAddGroup = fnAddGroup;
- g_clistApi.pfnAddItemToGroup = fnAddItemToGroup;
g_clistApi.pfnCreateClcContact = fnCreateClcContact;
g_clistApi.pfnFreeContact = fnFreeContact;
|