diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-04 16:21:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-04 16:21:28 +0300 |
commit | cb9750e8ef71c32441c34c169101c4329a9ac8b5 (patch) | |
tree | d8379e965edb88f1c071e02e4fdf37bf5f998dd3 /src/core/stdmsg | |
parent | e3b4b1b847c5beba21cdbc5c96f07364f61ea784 (diff) |
data used by some plugins only moved to these plugins
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 19 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 3 |
3 files changed, 14 insertions, 10 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index c1a2a3488c..fe7a0c3db7 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -69,13 +69,21 @@ GlobalLogSettings g_Settings; static void OnCreateModule(MODULEINFO *mi) { mi->OnlineIconIndex = ImageList_AddIcon(hIconsList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_ONLINE)); + mi->OfflineIconIndex = ImageList_AddIcon(hIconsList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_OFFLINE)); + + if (mi->hOnlineIcon) DestroyIcon(mi->hOnlineIcon); mi->hOnlineIcon = ImageList_GetIcon(hIconsList, mi->OnlineIconIndex, ILD_TRANSPARENT); + + if (mi->hOnlineTalkIcon) DestroyIcon(mi->hOnlineTalkIcon); mi->hOnlineTalkIcon = ImageList_GetIcon(hIconsList, mi->OnlineIconIndex, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1)); - ImageList_AddIcon(hIconsList, mi->hOnlineTalkIcon); - mi->OfflineIconIndex = ImageList_AddIcon(hIconsList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_OFFLINE)); + if (mi->hOfflineIcon) DestroyIcon(mi->hOfflineIcon); mi->hOfflineIcon = ImageList_GetIcon(hIconsList, mi->OfflineIconIndex, ILD_TRANSPARENT); + + if (mi->hOfflineTalkIcon) DestroyIcon(mi->hOfflineTalkIcon); mi->hOfflineTalkIcon = ImageList_GetIcon(hIconsList, mi->OfflineIconIndex, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1)); + + ImageList_AddIcon(hIconsList, mi->hOnlineTalkIcon); ImageList_AddIcon(hIconsList, mi->hOfflineTalkIcon); } @@ -85,12 +93,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 OnFlashHighlight(SESSION_INFO *si, int bInactive) { if (!bInactive) @@ -241,7 +243,6 @@ void Load_ChatModule() CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Chat module"), FONTMODE_SKIP }; pci = Chat_GetInterface(&data); - pci->OnNewUser = OnNewUser; pci->OnCreateModule = OnCreateModule; pci->OnReplaceSession = OnReplaceSession; diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index ea68c9c571..bc644da732 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -283,7 +283,7 @@ void CChatRoomDlg::UpdateOptions() if (m_si->iType == GCW_CHATROOM) EnableWindow(m_btnChannelMgr.GetHwnd(), mi->bChanMgr); - HICON hIcon = m_si->wStatus == ID_STATUS_ONLINE ? mi->hOnlineIcon : mi->hOfflineIcon; + HICON hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIcon : mi->hOfflineIcon; if (!hIcon) { pci->MM_IconsChanged(); hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIcon : mi->hOfflineIcon; diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index bb849b85d6..53cfdb2a66 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -88,6 +88,9 @@ extern CREOleCallback reOleCallback; struct MODULEINFO : public GCModuleInfoBase
{
+ HICON hOnlineIcon, hOnlineTalkIcon;
+ HICON hOfflineIcon, hOfflineTalkIcon;
+
int OnlineIconIndex;
int OfflineIconIndex;
};
|