summaryrefslogtreecommitdiff
path: root/protocols/Sametime/src/options.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-03-22 23:04:42 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-03-22 23:04:42 +0000
commit995af9f867a98c81701e5b2c5ee42cf665b21bc5 (patch)
tree5dbd423f18cd28f2a299035b7fe91b813e99aa22 /protocols/Sametime/src/options.cpp
parent319e17aa46ea27d8ac02240dcb95944a1b3920a2 (diff)
Sametime: translation fixes and fixes for disabled people
git-svn-id: http://svn.miranda-ng.org/main/trunk@8698 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src/options.cpp')
-rw-r--r--protocols/Sametime/src/options.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp
index d882233f48..0b73c398d3 100644
--- a/protocols/Sametime/src/options.cpp
+++ b/protocols/Sametime/src/options.cpp
@@ -5,6 +5,7 @@
#define DEFAULT_ID (0x1800)
#define NUM_IDS 20
+
TCHAR* client_names[NUM_IDS] = {
_T("Official Binary Library"),
_T("Official Java Applet"),
@@ -63,24 +64,21 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
proto = (CSametimeProto*)lParam;
- {
+ WORD client_ver = proto->GetClientVersion();
+ if (client_ver) {
TCHAR verbuf[100];
- WORD client_ver = proto->GetClientVersion();
- WORD server_ver = proto->GetServerVersion();
- if (client_ver)
- mir_sntprintf(verbuf, SIZEOF(verbuf), _T("Client proto version: %03d.%03d"), (client_ver & 0xFF00) >> 8, client_ver & 0xFF);
- else
- mir_sntprintf(verbuf, SIZEOF(verbuf), _T("Disconnected"));
+ mir_sntprintf(verbuf, SIZEOF(verbuf), TranslateT("Client proto version: %03d.%03d"), (client_ver & 0xFF00) >> 8, client_ver & 0xFF);
SetDlgItemText(hwndDlg, IDC_ST_CLIENTVER, verbuf);
- if (server_ver)
- mir_sntprintf(verbuf, SIZEOF(verbuf), _T("Server proto version: %03d.%03d"), (server_ver & 0xFF00) >> 8, server_ver & 0xFF);
- else
- mir_sntprintf(verbuf, SIZEOF(verbuf), _T("Disconnected"));
+ }
+
+ WORD server_ver = proto->GetServerVersion();
+ if (server_ver) {
+ TCHAR verbuf[100];
+ mir_sntprintf(verbuf, SIZEOF(verbuf), TranslateT("Server proto version: %03d.%03d"), (server_ver & 0xFF00) >> 8, server_ver & 0xFF);
SetDlgItemText(hwndDlg, IDC_ST_SERVERVER, verbuf);
}
- TCHAR* s;
- s = mir_utf8decodeT(proto->options.server_name); SetDlgItemText(hwndDlg, IDC_ED_SNAME, s); mir_free(s);
+ TCHAR *s = mir_utf8decodeT(proto->options.server_name); SetDlgItemText(hwndDlg, IDC_ED_SNAME, s); mir_free(s);
s = mir_utf8decodeT(proto->options.id); SetDlgItemText(hwndDlg, IDC_ED_NAME, s); mir_free(s);
s = mir_utf8decodeT(proto->options.pword); SetDlgItemText(hwndDlg, IDC_ED_PWORD, s); mir_free(s);
@@ -291,10 +289,10 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
return FALSE;
}
-int CSametimeProto::OptInit(WPARAM wParam, LPARAM lParam)
+int CSametimeProto::OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTNET);
odp.ptszTitle = m_tszUserName;