diff options
author | George Hazan <ghazan@miranda.im> | 2021-01-26 23:19:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-01-26 23:19:39 +0300 |
commit | 0ed539295d3618f0cb21c41158f2668e658d2035 (patch) | |
tree | 22fa4e5c568f9a4afad877f6d906ebddd4e65d4d /plugins/TabSRMM/src | |
parent | 21b040b1f73ccb5c5d89c0085bcffc8fdde1efd1 (diff) |
tabSRMM: fix for templates editor dialog
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 9 | ||||
-rw-r--r-- | plugins/TabSRMM/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 12 |
3 files changed, 19 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 9272ab790b..86f411ecaf 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -621,8 +621,8 @@ public: Utils::enableDlgControl(m_hwnd, IDC_REVERT, FALSE);
Utils::enableDlgControl(m_hwnd, IDC_FORGET, FALSE);
- for (auto &it : TemplateNames)
- listTemplates.AddString(TranslateW(_A2T(it)), int(&it - TemplateNames));
+ for (auto &it : TemplateNamesW)
+ listTemplates.AddString(TranslateW(it), int(&it - TemplateNamesW));
Utils::enableDlgControl(m_hwndParent, IDC_MODIFY, FALSE);
Utils::enableDlgControl(m_hwndParent, IDC_RTLMODIFY, FALSE);
@@ -679,7 +679,7 @@ public: SetTextColor(dis->hDC, GetSysColor(COLOR_WINDOWTEXT));
}
- auto *pwszName = TranslateW(_A2T(TemplateNames[iItem]));
+ const wchar_t *pwszName = TranslateW(TemplateNamesW[iItem]);
TextOutW(dis->hDC, dis->rcItem.left, dis->rcItem.top, pwszName, (int)mir_wstrlen(pwszName));
}
@@ -688,6 +688,9 @@ public: void onChange_Text(CCtrlEdit *)
{
+ if (!m_bInitialized)
+ return;
+
if (!selchanging) {
changed = TRUE;
updateInfo[inEdit] = TRUE;
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h index 994e3d9c09..f676067a79 100644 --- a/plugins/TabSRMM/src/stdafx.h +++ b/plugins/TabSRMM/src/stdafx.h @@ -223,6 +223,7 @@ extern COLORREF fontcolors[MSGDLGFONTCOUNT + 2]; extern HINSTANCE hinstance;
extern BOOL g_bIMGtagButton;
extern char* TemplateNames[TMPL_MAX];
+extern wchar_t* TemplateNamesW[TMPL_MAX];
extern HANDLE hUserPrefsWindowList;
extern TCpTable cpTable[];
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 6a90963485..a65b4e3cc0 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -45,6 +45,18 @@ char* TemplateNames[TMPL_MAX] = LPGEN("Error message") }; +wchar_t* TemplateNamesW[TMPL_MAX] = +{ + LPGENW("Message In"), + LPGENW("Message Out"), + LPGENW("Group In (Start)"), + LPGENW("Group Out (Start)"), + LPGENW("Group In (Inner)"), + LPGENW("Group Out (Inner)"), + LPGENW("Status change"), + LPGENW("Error message") +}; + TTemplateSet LTR_Default = { TRUE, |