From d9da7f147fbe91d2e70721de96907ae1d273b591 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Jun 2012 08:54:36 +0000 Subject: - langpack returned back; - fixes for the 64-bit compilation issues git-svn-id: http://svn.miranda-ng.org/main/trunk@651 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/modules.cpp | 4 ++-- src/modules/fonts/services.cpp | 7 ++++++- src/modules/langpack/lpservices.cpp | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/modules.cpp b/src/core/modules.cpp index 11e93f1354..8dbbf54e63 100644 --- a/src/core/modules.cpp +++ b/src/core/modules.cpp @@ -36,7 +36,7 @@ int LoadNewPluginsModule(void); // core: N.O. plugins int LoadSslModule(void); int LoadNetlibModule(void); // core: network void NetlibInitSsl(void); -int LoadLangPackModule(void); // core: translation +int LoadLangpackModule(void); // core: translation int LoadProtocolsModule(void); // core: protocol manager int LoadAccountsModule(void); // core: account manager int LoadIgnoreModule(void); // protocol filter: ignore @@ -97,7 +97,7 @@ int LoadDefaultModules(void) { //load order is very important for these if ( LoadSystemModule()) return 1; - if ( LoadLangPackModule()) return 1; // langpack will be a system module in the new order so this is moved here + if ( LoadLangpackModule()) return 1; // langpack will be a system module in the new order so this is moved here ParseCommandLine(); // IDD_WAITRESTART need langpack so this is moved here if ( LoadUtilsModule()) return 1; //order not important for this, but no dependencies and no point in pluginising if ( LoadIcoTabsModule()) return 1; diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp index adc5d216f2..3774cafe9f 100644 --- a/src/modules/fonts/services.cpp +++ b/src/modules/fonts/services.cpp @@ -299,8 +299,9 @@ static int sttRegisterFontWorker(FontIDW* font_id, int hLangpack) DBWriteContactSettingDword(0, font_id->dbSettingsGroup, idstr, font_id->flags); FontInternal* newItem = new FontInternal; - memset(newItem, 0, sizeof(FontIDW)); + memset(newItem, 0, sizeof(FontInternal)); memcpy(newItem, font_id, font_id->cbSize); + newItem->hLangpack = hLangpack; if ( !lstrcmp(newItem->deffontsettings.szFace, _T("MS Shell Dlg"))) { LOGFONT lf; @@ -387,7 +388,9 @@ static INT_PTR sttRegisterColourWorker(ColourIDW* colour_id, int hLangpack) } ColourInternal* newItem = new ColourInternal; + memset(newItem, 0, sizeof(ColourInternal)); memcpy(newItem, colour_id, sizeof(ColourIDW)); + newItem->hLangpack = hLangpack; UpdateColourSettings(colour_id, &newItem->value); colour_id_list.insert(newItem); return 0; @@ -462,7 +465,9 @@ static INT_PTR sttRegisterEffectWorker(EffectIDW* effect_id, int hLangpack) } EffectInternal* newItem = new EffectInternal; + memset(newItem, 0, sizeof(EffectInternal)); memcpy(newItem, effect_id, sizeof(EffectIDW)); + newItem->hLangpack = hLangpack; UpdateEffectSettings(effect_id, &newItem->value); effect_id_list.insert(newItem); return 0; diff --git a/src/modules/langpack/lpservices.cpp b/src/modules/langpack/lpservices.cpp index b346a6a277..e828a85c6a 100644 --- a/src/modules/langpack/lpservices.cpp +++ b/src/modules/langpack/lpservices.cpp @@ -88,9 +88,11 @@ INT_PTR srvReloadLangpack(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// -int LoadLangPackModule(void) +MIR_CORE_DLL(int) LoadLangPackModule(void); + +int LoadLangpackModule(void) { - ReloadLangpack(NULL); + LoadLangPackModule(); CreateServiceFunction(MS_LANGPACK_TRANSLATESTRING, srvTranslateString); CreateServiceFunction(MS_LANGPACK_TRANSLATEMENU, srvTranslateMenu); -- cgit v1.2.3