From 09121bfc0da22a40142e70a276a47fb639390cc4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 22 May 2018 19:50:35 +0300 Subject: m_chat_int.h => CMPlugin --- include/m_chat_int.h | 3 ++- libs/win32/mir_app.lib | Bin 167958 -> 167958 bytes plugins/Scriver/src/chat_main.cpp | 2 +- plugins/Scriver/src/stdafx.h | 10 +++++----- plugins/TabSRMM/src/chat_main.cpp | 2 +- src/mir_app/src/chat_manager.cpp | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 5369ceebfd..82aff081a3 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -247,6 +247,7 @@ struct CHAT_MANAGER_INITDATA int cbModuleInfo, cbSession; wchar_t *szFontGroup; int iFontMode; + int iLangId; }; typedef BOOL (*pfnDoTrayIcon)(SESSION_INFO *si, GCEVENT *gce); @@ -362,7 +363,7 @@ struct CHAT_MANAGER extern CHAT_MANAGER *pci; #endif -EXTERN_C MIR_APP_DLL(CHAT_MANAGER*) Chat_GetInterface(CHAT_MANAGER_INITDATA *pData = nullptr, int = hLangpack); +EXTERN_C MIR_APP_DLL(CHAT_MANAGER*) Chat_GetInterface(CHAT_MANAGER_INITDATA *pData = nullptr); ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib index 8da0c0e975..4ac19ab691 100644 Binary files a/libs/win32/mir_app.lib and b/libs/win32/mir_app.lib differ diff --git a/plugins/Scriver/src/chat_main.cpp b/plugins/Scriver/src/chat_main.cpp index 7be39fdf65..503c8b07b0 100644 --- a/plugins/Scriver/src/chat_main.cpp +++ b/plugins/Scriver/src/chat_main.cpp @@ -129,7 +129,7 @@ static void OnLoadSettings() int Chat_Load() { - CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Messaging") L"/" LPGENW("Group chats"), FONTMODE_SKIP }; + CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Messaging") L"/" LPGENW("Group chats"), FONTMODE_SKIP, g_plugin.m_hLang }; pci = Chat_GetInterface(&data); pci->OnCreateModule = OnCreateModule; diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h index 7624a32ac3..e023334fe9 100644 --- a/plugins/Scriver/src/stdafx.h +++ b/plugins/Scriver/src/stdafx.h @@ -68,6 +68,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +struct CMPlugin : public PLUGIN +{ + CMPlugin(); +}; + #include "resource.h" #include "version.h" @@ -116,11 +121,6 @@ int StatusIconPressed(WPARAM wParam, LPARAM lParam); #include "statusicon.h" #include "chat.h" -struct CMPlugin : public PLUGIN -{ - CMPlugin(); -}; - extern GlobalMessageData g_dat; #endif diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp index 383267c89a..8dc53ad7cf 100644 --- a/plugins/TabSRMM/src/chat_main.cpp +++ b/plugins/TabSRMM/src/chat_main.cpp @@ -216,7 +216,7 @@ int Chat_Load() CheckUpdate(); Utils::RTF_CTableInit(); - CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Message sessions") L"/" LPGENW("Group chats"), FONTMODE_ALTER }; + CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Message sessions") L"/" LPGENW("Group chats"), FONTMODE_ALTER, g_plugin.m_hLang }; pci = Chat_GetInterface(&data); pci->OnCreateModule = OnCreateModule; diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp index 783b7539dd..36a871e7ff 100644 --- a/src/mir_app/src/chat_manager.cpp +++ b/src/mir_app/src/chat_manager.cpp @@ -971,7 +971,7 @@ static BOOL LM_RemoveAll(LOGINFO **ppLogListStart, LOGINFO **ppLogListEnd) return TRUE; } -MIR_APP_DLL(CHAT_MANAGER*) Chat_GetInterface(CHAT_MANAGER_INITDATA *pInit, int _hLangpack) +MIR_APP_DLL(CHAT_MANAGER*) Chat_GetInterface(CHAT_MANAGER_INITDATA *pInit) { if (pInit == nullptr) return &chatApi; @@ -1009,7 +1009,7 @@ MIR_APP_DLL(CHAT_MANAGER*) Chat_GetInterface(CHAT_MANAGER_INITDATA *pInit, int _ g_cbSession = pInit->cbSession; g_cbModuleInfo = pInit->cbModuleInfo; g_iFontMode = pInit->iFontMode; - g_iChatLang = _hLangpack; + g_iChatLang = pInit->iLangId; chatApi.SetActiveSession = SetActiveSession; chatApi.GetActiveSession = GetActiveSession; -- cgit v1.2.3