summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-04 21:07:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-04 21:07:46 +0300
commitd4b6de0fb4ca58063eb2f424c77e74e703022b63 (patch)
tree831c18be8048b34ddacf132c1bb204e92cd9cb92 /src
parent53156bdc6edde511dbdf5e999756cd80d0a97e13 (diff)
static function CLIST_INTERFACE::pfnGetContactIcon exported as Clist_GetContactIcon (history++ to be recompiled)
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/clc.cpp2
-rw-r--r--src/mir_app/src/clc.h1
-rw-r--r--src/mir_app/src/clcitems.cpp2
-rw-r--r--src/mir_app/src/clistcore.cpp5
-rw-r--r--src/mir_app/src/clistevents.cpp2
-rw-r--r--src/mir_app/src/clistmod.cpp4
-rw-r--r--src/mir_app/src/meta_menu.cpp2
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
9 files changed, 10 insertions, 10 deletions
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 90c37c5913..5fe2cd43d2 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -497,7 +497,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
int shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b(wParam, "CList", "Hidden", 0))
- && (!cli.pfnIsHiddenMode(dat, status) || cli.pfnGetContactIcon(wParam) != lParam);
+ && (!cli.pfnIsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam);
contact = nullptr;
group = nullptr;
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index 3b82c9c07d..6a3dbe6e0f 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -143,7 +143,6 @@ int fnGetImlIconIndex(HICON hIcon);
int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent);
/* clistmod.c */
-int fnGetContactIcon(MCONTACT hContact);
int fnIconFromStatusMode(const char *szProto, int status, MCONTACT hContact);
int fnShowHide(void);
HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status);
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 4a6a537463..15edcc8975 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -186,7 +186,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact
ClcContact *cc = cli.pfnAddItemToGroup(group, index + 1);
cc->type = CLCIT_CONTACT;
- cc->iImage = cli.pfnGetContactIcon(hContact);
+ cc->iImage = Clist_GetContactIcon(hContact);
cc->hContact = hContact;
cc->proto = szProto;
cc->pce = pce;
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp
index afac74bb60..780b692aa1 100644
--- a/src/mir_app/src/clistcore.cpp
+++ b/src/mir_app/src/clistcore.cpp
@@ -126,7 +126,6 @@ void InitClistCore()
cli.pfnLoadClcOptions = fnLoadClcOptions;
cli.pfnRecalculateGroupCheckboxes = fnRecalculateGroupCheckboxes;
cli.pfnSetGroupChildCheckboxes = fnSetGroupChildCheckboxes;
- cli.pfnSetContactCheckboxes = fnSetContactCheckboxes;
cli.pfnInvalidateItem = fnInvalidateItem;
cli.pfnGetRowBottomY = fnGetRowBottomY;
cli.pfnGetRowHeight = fnGetRowHeight;
@@ -166,7 +165,6 @@ void InitClistCore()
cli.pfnTrayIconTaskbarCreated = fnTrayIconTaskbarCreated;
cli.pfnTrayIconUpdate = fnTrayIconUpdate;
cli.pfnTrayIconUpdateBase = fnTrayIconUpdateBase;
- cli.pfnTrayCalcChanged = fnTrayCalcChanged;
cli.pfnTrayIconUpdateWithImageList = fnTrayIconUpdateWithImageList;
cli.pfnContactListWndProc = fnContactListWndProc;
@@ -196,7 +194,8 @@ void InitClistCore()
cli.pfnReloadExtraIcons = fnReloadExtraIcons;
cli.pfnSetAllExtraIcons = fnSetAllExtraIcons;
- cli.pfnGetContactIcon = fnGetContactIcon;
+ cli.pfnTrayCalcChanged = fnTrayCalcChanged;
+ cli.pfnSetContactCheckboxes = fnSetContactCheckboxes;
}
MIR_APP_DLL(CLIST_INTERFACE*) Clist_GetInterface(void)
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp
index c000f1462f..23ad631518 100644
--- a/src/mir_app/src/clistevents.cpp
+++ b/src/mir_app/src/clistevents.cpp
@@ -212,7 +212,7 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent)
// Update contact's icon
char *szProto = GetContactProto(hContact);
- cli.pfnChangeContactIcon(pEvent->hContact, cli.pfnGetContactIcon(pEvent->hContact));
+ cli.pfnChangeContactIcon(pEvent->hContact, Clist_GetContactIcon(pEvent->hContact));
// Free any memory allocated to the event
g_cliEvents.remove(pEvent);
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index 5e2ee7c22f..9681a2c8d9 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -151,13 +151,13 @@ int fnIconFromStatusMode(const char *szProto, int status, MCONTACT)
return index + 1;
for (auto &it : protoIconIndex)
- if (mir_strcmp(szProto, it->szProto) == 0)
+ if (!mir_strcmp(szProto, it->szProto))
return it->iIconBase + index;
return 1;
}
-int fnGetContactIcon(MCONTACT hContact)
+MIR_APP_DLL(int) Clist_GetContactIcon(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
return cli.pfnIconFromStatusMode(szProto,
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index 29811574ae..954202464d 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -282,7 +282,7 @@ int Meta_ModifyMenu(WPARAM hMeta, LPARAM)
}
else ptszName = cli.pfnGetContactDisplayName(hContact, 0);
- HICON hIcon = ImageList_GetIcon(hCListImages, cli.pfnGetContactIcon(hContact), 0);
+ HICON hIcon = ImageList_GetIcon(hCListImages, Clist_GetContactIcon(hContact), 0);
Menu_ModifyItem(hMenuContact[i], ptszName, hIcon, 0);
DestroyIcon(hIcon);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index cd44fb5702..8e5792b29f 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -536,3 +536,4 @@ Proto_SetUniqueId @549
Clist_GetProtocolVisibility @556
?Accounts@@YGAAU?$LIST@UPROTOACCOUNT@@@@XZ @557 NONAME
Clist_InitAutoRebuild @558
+Clist_GetContactIcon @559
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 2e25954dc0..f79999b61b 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -536,3 +536,4 @@ Proto_SetUniqueId @549
Clist_GetProtocolVisibility @556
?Accounts@@YAAEAU?$LIST@UPROTOACCOUNT@@@@XZ @557 NONAME
Clist_InitAutoRebuild @558
+Clist_GetContactIcon @559