summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-23 18:56:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-23 18:56:56 +0000
commit3c0dcc2b03f6713b9c1906b3960801bcdf05666a (patch)
tree1ff14d8a8af08e1f4f126b71363ca9dc604f5aa6 /src
parent59469a44731feba111a76f0154c42bb3fc5bb04e (diff)
ME_MC_ENABLED - signalizes that metacontacts are enabled or disabled
git-svn-id: http://svn.miranda-ng.org/main/trunk@9926 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/mc.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mir_core/mc.cpp b/src/mir_core/mc.cpp
index 8fdc9fda4a..ba9bbb7697 100644
--- a/src/mir_core/mc.cpp
+++ b/src/mir_core/mc.cpp
@@ -24,12 +24,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
-static HANDLE hEventDefaultChanged;
+static HANDLE hEventDefaultChanged, hEventEnabled;
static bool g_bEnabled;
void InitMetaContacts()
{
hEventDefaultChanged = CreateHookableEvent(ME_MC_DEFAULTTCHANGED);
+ hEventEnabled = CreateHookableEvent(ME_MC_ENABLED);
}
DBCachedContact* CheckMeta(MCONTACT hMeta)
@@ -70,6 +71,8 @@ MIR_CORE_DLL(BOOL) db_mc_isEnabled(void)
MIR_CORE_DLL(void) db_mc_enable(BOOL bEnabled)
{
g_bEnabled = bEnabled != 0;
+
+ NotifyEventHooks(hEventDefaultChanged, g_bEnabled, 0);
}
MIR_CORE_DLL(BOOL) db_mc_isMeta(MCONTACT hContact)
@@ -178,4 +181,4 @@ MIR_CORE_DLL(int) db_mc_setDefaultNum(MCONTACT hMetaContact, int iNum, BOOL bWri
extern "C" MIR_CORE_DLL(void) db_mc_notifyDefChange(WPARAM wParam, LPARAM lParam)
{
NotifyEventHooks(hEventDefaultChanged, wParam, lParam);
-} \ No newline at end of file
+}