diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-03 20:59:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-03 20:59:43 +0000 |
commit | 81ff20eeeb59aa2c72b737d7c6e18baa1a2478d5 (patch) | |
tree | 23ba4f180287ca66042c1d90c06d0816b4b99165 /src/modules/langpack/langpack.cpp | |
parent | d08dc5de734505b7016a517e27f7ab6eef06e271 (diff) |
MS_LANGPACK_RELOAD - dynamically reloads a language pack
git-svn-id: http://svn.miranda-ng.org/main/trunk@290 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/langpack/langpack.cpp')
-rw-r--r-- | src/modules/langpack/langpack.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/modules/langpack/langpack.cpp b/src/modules/langpack/langpack.cpp index 8950bc61c5..cec6511386 100644 --- a/src/modules/langpack/langpack.cpp +++ b/src/modules/langpack/langpack.cpp @@ -539,10 +539,9 @@ int LoadLangPackModule(void) void UnloadLangPackModule()
{
- int i;
-
if ( !bModuleInitialized ) return;
+ int i;
for ( i=0; i < lMuuids.getCount(); i++ )
mir_free( lMuuids[i] );
lMuuids.destroy();
@@ -555,8 +554,7 @@ void UnloadLangPackModule() mir_free( p2->local);
mir_free( p2->wlocal);
mir_free( p2 );
- }
- }
+ } }
mir_free( p->local );
mir_free( p->wlocal );
@@ -567,3 +565,16 @@ void UnloadLangPackModule() langPack.entry=0;
langPack.entryCount=0;
} }
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+INT_PTR ReloadLangpack(WPARAM wParam, LPARAM lParam)
+{
+ TCHAR* pszStr = ( TCHAR* )lParam;
+ if ( pszStr == NULL )
+ pszStr = langPack.filename;
+
+ UnloadLangPackModule();
+ LoadLangPack(pszStr);
+ return 0;
+}
|