summaryrefslogtreecommitdiff
path: root/plugins
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
parente3b4b1b847c5beba21cdbc5c96f07364f61ea784 (diff)
data used by some plugins only moved to these plugins
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/chat.h4
-rw-r--r--plugins/Scriver/src/chat_main.cpp15
-rw-r--r--plugins/TabSRMM/src/chat_main.cpp4
3 files changed, 11 insertions, 12 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;
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp
index d461209b05..c7131cc174 100644
--- a/plugins/TabSRMM/src/chat_main.cpp
+++ b/plugins/TabSRMM/src/chat_main.cpp
@@ -61,10 +61,8 @@ static void OnSetTopic(SESSION_INFO *si)
static void OnNewUser(SESSION_INFO *si, USERINFO*)
{
- if (si->pDlg) {
- si->pDlg->UpdateNickList();
+ if (si->pDlg)
si->pDlg->GetMyNick();
- }
}
static void OnChangeNick(SESSION_INFO *si)