summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp9
-rw-r--r--plugins/TabSRMM/src/stdafx.h1
-rw-r--r--plugins/TabSRMM/src/templates.cpp12
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,