summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat_main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-04-04 16:21:28 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-04-04 16:21:28 +0300
commitcb9750e8ef71c32441c34c169101c4329a9ac8b5 (patch)
treed8379e965edb88f1c071e02e4fdf37bf5f998dd3 /plugins/Scriver/src/chat_main.cpp
parente3b4b1b847c5beba21cdbc5c96f07364f61ea784 (diff)
data used by some plugins only moved to these plugins
Diffstat (limited to 'plugins/Scriver/src/chat_main.cpp')
-rw-r--r--plugins/Scriver/src/chat_main.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/Scriver/src/chat_main.cpp b/plugins/Scriver/src/chat_main.cpp
index 5c7e1183f7..2c845d7a0a 100644
--- a/plugins/Scriver/src/chat_main.cpp
+++ b/plugins/Scriver/src/chat_main.cpp
@@ -37,11 +37,19 @@ void LoadModuleIcons(MODULEINFO *mi)
ImageList_SetOverlayImage(hList, overlayIcon, 1);
int index = ImageList_AddIcon(hList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_ONLINE));
+
+ if (mi->hOnlineIcon) DestroyIcon(mi->hOnlineIcon);
mi->hOnlineIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT);
+
+ if (mi->hOnlineTalkIcon) DestroyIcon(mi->hOnlineTalkIcon);
mi->hOnlineTalkIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
index = ImageList_AddIcon(hList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_OFFLINE));
+
+ if (mi->hOfflineIcon) DestroyIcon(mi->hOfflineIcon);
mi->hOfflineIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT);
+
+ if (mi->hOfflineTalkIcon) DestroyIcon(mi->hOfflineTalkIcon);
mi->hOfflineTalkIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
ImageList_Destroy(hList);
@@ -53,12 +61,6 @@ static void OnReplaceSession(SESSION_INFO *si)
RedrawWindow(GetDlgItem(si->pDlg->GetHwnd(), IDC_SRMM_NICKLIST), nullptr, nullptr, RDW_INVALIDATE);
}
-static void OnNewUser(SESSION_INFO *si, USERINFO*)
-{
- if (si->pDlg)
- si->pDlg->UpdateNickList();
-}
-
static void OnSetStatus(SESSION_INFO *si, int)
{
if (si->pDlg)
@@ -135,7 +137,6 @@ int Chat_Load()
pci = Chat_GetInterface(&data);
pci->OnCreateModule = OnCreateModule;
- pci->OnNewUser = OnNewUser;
pci->OnLoadSettings = OnLoadSettings;
pci->OnSetStatus = OnSetStatus;