summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-01-12 21:48:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-01-12 21:48:38 +0000
commit415be306c7fe4f424b1c2379907121cc46ff84de (patch)
tree29a8147bab25b1d08358c01ea865152caa81ec2b /src/mir_core
parent0d5f64c436dff87b1297f1d35730c76d69c7240c (diff)
new event, ME_LANGPACK_CHANGED, to be called after the dynamic langpack change
git-svn-id: http://svn.miranda-ng.org/main/trunk@3086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/commonheaders.h1
-rw-r--r--src/mir_core/langpack.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mir_core/commonheaders.h b/src/mir_core/commonheaders.h
index 5afcda256e..94afa341ea 100644
--- a/src/mir_core/commonheaders.h
+++ b/src/mir_core/commonheaders.h
@@ -57,6 +57,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_database.h>
#include <m_db_int.h>
#include <newpluginapi.h>
+#include <m_langpack.h>
#include "miranda.h"
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index 015af8f469..bc0d59300b 100644
--- a/src/mir_core/langpack.cpp
+++ b/src/mir_core/langpack.cpp
@@ -31,6 +31,7 @@ static int CompareMuuids(const MUUID* p1, const MUUID* p2)
static LIST<MUUID> lMuuids(10, CompareMuuids);
static MUUID* pCurrentMuuid = NULL;
+static HANDLE hevChanged = 0;
static BOOL bModuleInitialized = FALSE;
@@ -576,6 +577,8 @@ MIR_CORE_DLL(int) LoadLangPackModule(void)
ZeroMemory(&langPack, sizeof(langPack));
+ hevChanged = CreateHookableEvent(ME_LANGPACK_CHANGED);
+
TCHAR szSearch[MAX_PATH];
PathToAbsoluteT(_T("langpack_*.txt"), szSearch, NULL);
@@ -628,4 +631,6 @@ MIR_CORE_DLL(void) ReloadLangpack(TCHAR *pszStr)
UnloadLangPackModule();
LoadLangPack(pszStr);
Langpack_SortDuplicates();
+
+ NotifyEventHooks(hevChanged, 0, 0);
}