summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-19 21:55:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-19 21:55:03 +0300
commit5797df55a7e19fac3874429bf753a57e8daef970 (patch)
tree6d629660c7bc8b782b6633d1a3a74efc2b970bcd /protocols
parent18ed16634f78049a3b8ede2ccef6849ac2b2b7da (diff)
fix for chinese in Registration dialog
Diffstat (limited to 'protocols')
-rwxr-xr-xprotocols/JabberG/src/jabber_opt.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index 9656608d10..4ca81ab92e 100755
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -33,8 +33,6 @@ static BOOL(WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = nullptr;
/////////////////////////////////////////////////////////////////////////////////////////
// JabberRegisterDlgProc - the dialog proc for registering new account
-#define STR_FORMAT L"%s %s@%S:%d?"
-
struct { char *szCode; wchar_t *szDescription; } g_LanguageCodes[] = {
{ "aa", LPGENW("Afar") },
{ "ab", LPGENW("Abkhazian") },
@@ -227,6 +225,12 @@ struct { char *szCode; wchar_t *szDescription; } g_LanguageCodes[] = {
class CJabberDlgRegister : public CJabberDlgBase
{
typedef CJabberDlgBase CSuper;
+
+ bool m_bProcessStarted;
+ JABBER_CONN_DATA *m_regInfo;
+
+ CCtrlButton m_btnOk;
+
public:
CJabberDlgRegister(CJabberProto *proto, HWND hwndParent, JABBER_CONN_DATA *regInfo) :
CJabberDlgBase(proto, IDD_OPT_REGISTER),
@@ -239,12 +243,10 @@ public:
m_btnOk.OnClick = Callback(this, &CJabberDlgRegister::btnOk_OnClick);
}
-protected:
bool OnInitDialog() override
{
- wchar_t text[256];
- mir_snwprintf(text, STR_FORMAT, TranslateT("Register"), m_regInfo->username, m_regInfo->server, m_regInfo->port);
- SetDlgItemText(m_hwnd, IDC_REG_STATUS, text);
+ CMStringA text(FORMAT, "%s %s@%s:%d?", Translate("Register"), m_regInfo->username, m_regInfo->server, m_regInfo->port);
+ SetDlgItemTextUtf(m_hwnd, IDC_REG_STATUS, text);
return true;
}
@@ -253,9 +255,9 @@ protected:
switch (msg) {
case WM_JABBER_REGDLG_UPDATE: // wParam=progress (0-100), lparam=status string
if ((wchar_t*)lParam == nullptr)
- SetDlgItemText(m_hwnd, IDC_REG_STATUS, TranslateT("No message"));
+ SetDlgItemTextW(m_hwnd, IDC_REG_STATUS, TranslateT("No message"));
else
- SetDlgItemText(m_hwnd, IDC_REG_STATUS, (wchar_t*)lParam);
+ SetDlgItemTextW(m_hwnd, IDC_REG_STATUS, (wchar_t*)lParam);
SendDlgItemMessage(m_hwnd, IDC_PROGRESS_REG, PBM_SETPOS, wParam, 0);
if (wParam >= 100)
@@ -269,12 +271,6 @@ protected:
return CSuper::DlgProc(msg, wParam, lParam);
}
-private:
- bool m_bProcessStarted;
- JABBER_CONN_DATA *m_regInfo;
-
- CCtrlButton m_btnOk;
-
void btnOk_OnClick(CCtrlButton*)
{
if (m_bProcessStarted) {