summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-31 12:24:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-31 12:24:58 +0300
commit8bd59593912495db8b41f885c1c9c8c5687e4156 (patch)
tree58cff42775b59a620261b62bb91f82f130e0e782 /plugins
parentd70004f376a18f4c44ff47d423f0715a050002fd (diff)
fixes #1397 (StdMsg: dynamic loading breaks meta menu)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/msgs.cpp1
-rw-r--r--plugins/Scriver/src/statusicon.cpp12
-rw-r--r--plugins/Scriver/src/statusicon.h1
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp11
-rw-r--r--plugins/TabSRMM/src/globals.cpp1
-rw-r--r--plugins/TabSRMM/src/msgs.h1
6 files changed, 2 insertions, 25 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index e5f4ca310e..cc1b078373 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -598,7 +598,6 @@ int OnSystemPreshutdown(WPARAM, LPARAM)
{
Srmm_Broadcast(WM_CLOSE, 0, 0);
WindowList_Broadcast(g_dat.hParentWindowList, WM_CLOSE, 0, 0);
- DeinitStatusIcons();
return 0;
}
diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp
index b11d49cd1a..ce5a3c2386 100644
--- a/plugins/Scriver/src/statusicon.cpp
+++ b/plugins/Scriver/src/statusicon.cpp
@@ -23,8 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-HANDLE hHookIconPressedEvt;
-
void DrawStatusIcons(MCONTACT hContact, HDC hDC, const RECT &r, int gap)
{
int x = r.left;
@@ -56,7 +54,7 @@ void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, const RECT
sicd.dwId = si->dwId;
sicd.szModule = si->szModule;
sicd.flags = click_flags;
- NotifyEventHooks(hHookIconPressedEvt, hContact, (LPARAM)&sicd);
+ Srmm_ClickStatusIcon(hContact, &sicd);
}
static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
@@ -74,14 +72,6 @@ static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
int InitStatusIcons()
{
HookEvent(ME_MSG_ICONSCHANGED, OnSrmmIconChanged);
-
- hHookIconPressedEvt = CreateHookableEvent(ME_MSG_ICONPRESSED);
- return 0;
-}
-
-int DeinitStatusIcons()
-{
- DestroyHookableEvent(hHookIconPressedEvt);
return 0;
}
diff --git a/plugins/Scriver/src/statusicon.h b/plugins/Scriver/src/statusicon.h
index 1788637637..d25f2b909c 100644
--- a/plugins/Scriver/src/statusicon.h
+++ b/plugins/Scriver/src/statusicon.h
@@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define _STATUS_ICON_INC
int InitStatusIcons();
-int DeinitStatusIcons();
int GetStatusIconsCount(MCONTACT hContact);
void DrawStatusIcons(MCONTACT hContact, HDC hdc, const RECT &r, int gap);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index e2554acf5f..ca06a2a07c 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1352,7 +1352,6 @@ void CTabBaseDlg::DM_HandleAutoSizeRequest(REQRESIZE* rr)
// status icon stuff (by sje, used for indicating encryption status in the status bar
// this is now part of the message window api
-static HANDLE hHookIconPressedEvt;
static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
{
@@ -1459,7 +1458,7 @@ void CTabBaseDlg::CheckStatusIconClick(POINT pt, const RECT &rc, int gap, int co
sicd.dwId = sid->dwId;
sicd.szModule = sid->szModule;
sicd.flags = (code == NM_RCLICK ? MBCF_RIGHTBUTTON : 0);
- NotifyEventHooks(hHookIconPressedEvt, m_hContact, (LPARAM)&sicd);
+ Srmm_ClickStatusIcon(m_hContact, &sicd);
InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE);
}
}
@@ -1534,13 +1533,5 @@ int SI_InitStatusIcons()
Srmm_AddIcon(&sid, g_plugin.m_hLang);
HookEvent(ME_MSG_ICONSCHANGED, OnSrmmIconChanged);
-
- hHookIconPressedEvt = CreateHookableEvent(ME_MSG_ICONPRESSED);
- return 0;
-}
-
-int SI_DeinitStatusIcons()
-{
- DestroyHookableEvent(hHookIconPressedEvt);
return 0;
}
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index bdc5bdc3ec..544fc9cc98 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -454,7 +454,6 @@ int CGlobals::PreshutdownSendRecv(WPARAM, LPARAM)
for (auto &hContact : Contacts())
db_set_dw(hContact, SRMSGMOD_T, "messagecount", 0);
- ::SI_DeinitStatusIcons();
::NEN_WriteOptions(&nen_options);
::DestroyWindow(PluginConfig.g_hwndHotkeyHandler);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 166247d4c1..1f75548e90 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -1100,7 +1100,6 @@ struct SIDEBARITEM {
#define MSG_ICON_SOUND 2
int SI_InitStatusIcons();
-int SI_DeinitStatusIcons();
struct SKINDESC
{