diff options
Diffstat (limited to 'plugins/NewStory/src/history_control.cpp')
-rw-r--r-- | plugins/NewStory/src/history_control.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index a944053381..b10e7a98a3 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -67,6 +67,12 @@ NewstoryListData::NewstoryListData(HWND _1) : iLineHeigth = GetFontHeight(g_fontTable[FONT_INMSG].lf);
}
+NewstoryListData::~NewstoryListData()
+{
+ for (auto &it : m_protoIcons)
+ IcoLib_ReleaseIcon(it.second);
+}
+
void NewstoryListData::onTimer_Draw(CTimer *pTimer)
{
pTimer->Stop();
@@ -772,6 +778,21 @@ void NewstoryListData::Paint(simpledib::dib &dib) if (!bReadOnly) {
HICON hIcon;
+ // Protocol icon
+ if (m_hContact == INVALID_CONTACT_ID) {
+ if (auto *pa = Proto_GetContactAccount(pItem->dbe.hContact)) {
+ if (m_protoIcons.count(pa->szModuleName))
+ hIcon = m_protoIcons[pa->szModuleName];
+ else {
+ hIcon = Skin_LoadProtoIcon(pa->szModuleName, ID_STATUS_ONLINE);
+ m_protoIcons[pa->szModuleName] = hIcon;
+ }
+
+ DrawIconEx(dib, xPos, yPos, hIcon, 16, 16, 0, 0, DI_NORMAL);
+ xPos += 18;
+ }
+ }
+
// Message type icon
if (g_plugin.bShowType) {
switch (pItem->dbe.eventType) {
|