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 /plugins/Scriver | |
parent | e3b4b1b847c5beba21cdbc5c96f07364f61ea784 (diff) |
data used by some plugins only moved to these plugins
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/chat.h | 4 | ||||
-rw-r--r-- | plugins/Scriver/src/chat_main.cpp | 15 |
2 files changed, 10 insertions, 9 deletions
diff --git a/plugins/Scriver/src/chat.h b/plugins/Scriver/src/chat.h index f4bee7dcfb..384bfd2ab3 100644 --- a/plugins/Scriver/src/chat.h +++ b/plugins/Scriver/src/chat.h @@ -47,8 +47,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct MODULEINFO : public GCModuleInfoBase
{
- HICON hOnlineIconBig;
- HICON hOfflineIconBig;
+ HICON hOnlineIcon, hOnlineTalkIcon, hOnlineIconBig;
+ HICON hOfflineIcon, hOfflineTalkIcon, hOfflineIconBig;
};
struct LOGSTREAMDATA : public GCLogStreamDataBase
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;
|