diff options
author | George Hazan <ghazan@miranda.im> | 2022-01-27 20:19:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-01-27 20:19:23 +0300 |
commit | 81ccc3118d53a2e09e64ce4b750cf9dd7cbc9b5a (patch) | |
tree | ec21842d04b055cbe1bac344b04e3292d00b4708 /src/mir_app | |
parent | 82af5f627aadcd1e0ee474a41c6fb51bdef6a7b2 (diff) |
fixes #3016 (Названия журналов так и не переводятся)
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/mir_app.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_log.cpp | 16 | ||||
-rw-r--r-- | src/mir_app/src/srmm_log_hpp.cpp | 2 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 174144ffcc..be81fe60de 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -715,7 +715,7 @@ UnregisterHppLogger @786 ?ScrollToBottom@CRtfLogWindow@@UAEXXZ @802 NONAME
?UpdateOptions@CSrmmLogWindow@@UAEXXZ @803 NONAME
?WndProc@CRtfLogWindow@@UAEHIIJ@Z @804 NONAME
-_RegisterSrmmLog@12 @805 NONAME
+_RegisterSrmmLog@16 @805 NONAME
_UnregisterSrmmLog@4 @806 NONAME
?GetType@CRtfLogWindow@@UAEHXZ @807 NONAME
_WebSocket_InitHeader@12 @809 NONAME
diff --git a/src/mir_app/src/srmm_log.cpp b/src/mir_app/src/srmm_log.cpp index 9bad198915..fe2770cd4e 100644 --- a/src/mir_app/src/srmm_log.cpp +++ b/src/mir_app/src/srmm_log.cpp @@ -29,12 +29,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct LoggerClass { - LoggerClass(const char *p1, const wchar_t *p2, pfnSrmmLogCreator p3) : - szShortName(mir_strdup(p1)), - wszScreenName(mir_wstrdup(p2)), - pfnBuilder(p3) + LoggerClass(CMPlugin *p1, const char *p2, const wchar_t *p3, pfnSrmmLogCreator p4) : + pPlugin(p1), + szShortName(mir_strdup(p2)), + wszScreenName(mir_wstrdup(p3)), + pfnBuilder(p4) {} + CMPlugin *pPlugin; ptrA szShortName; ptrW wszScreenName; pfnSrmmLogCreator pfnBuilder; @@ -123,7 +125,7 @@ public: ptrA szCurr(db_get_sa(0, "SRMM", "Logger", "built-in")); for (auto &it : g_arLogClasses) { - int idx = m_list.AddString(it->wszScreenName, LPARAM(it)); + int idx = m_list.AddString(TranslateW_LP(it->wszScreenName, it->pPlugin), LPARAM(it)); if (!mir_strcmp(szCurr, it->szShortName)) m_list.SetCurSel(idx); } @@ -172,12 +174,12 @@ void SrmmLogOptionsInit(WPARAM wParam) ///////////////////////////////////////////////////////////////////////////////////////// -MIR_APP_DLL(HANDLE) RegisterSrmmLog(const char *pszShortName, const wchar_t *pwszScreenName, pfnSrmmLogCreator fnBuilder) +MIR_APP_DLL(HANDLE) RegisterSrmmLog(CMPlugin *pPlugin, const char *pszShortName, const wchar_t *pwszScreenName, pfnSrmmLogCreator fnBuilder) { if (!pszShortName || !pwszScreenName || !fnBuilder) return nullptr; - auto *p = new LoggerClass(pszShortName, pwszScreenName, fnBuilder); + auto *p = new LoggerClass(pPlugin, pszShortName, pwszScreenName, fnBuilder); g_arLogClasses.insert(p); if (pDialog) diff --git a/src/mir_app/src/srmm_log_hpp.cpp b/src/mir_app/src/srmm_log_hpp.cpp index 10e1beacb6..65eef1bfa5 100644 --- a/src/mir_app/src/srmm_log_hpp.cpp +++ b/src/mir_app/src/srmm_log_hpp.cpp @@ -218,7 +218,7 @@ static CSrmmLogWindow *logBuilder(CMsgDialog &pDlg) MIR_APP_DLL(void) RegisterHppLogger() { - hLogger = RegisterSrmmLog("hpp", L"History++", &logBuilder); + hLogger = RegisterSrmmLog(&g_plugin, "hpp", L"History++", &logBuilder); } MIR_APP_DLL(void) UnregisterHppLogger() |