From 995af9f867a98c81701e5b2c5ee42cf665b21bc5 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 22 Mar 2014 23:04:42 +0000 Subject: Sametime: translation fixes and fixes for disabled people git-svn-id: http://svn.miranda-ng.org/main/trunk@8698 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Sametime/res/resource.rc | 83 ++++++++++++++++++++----------------- protocols/Sametime/src/options.cpp | 28 ++++++------- protocols/Sametime/src/sametime.cpp | 18 ++++---- 3 files changed, 67 insertions(+), 62 deletions(-) (limited to 'protocols') diff --git a/protocols/Sametime/res/resource.rc b/protocols/Sametime/res/resource.rc index 94aa8fcc6e..b6ce4d4429 100644 --- a/protocols/Sametime/res/resource.rc +++ b/protocols/Sametime/res/resource.rc @@ -16,57 +16,56 @@ // English (Australia) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA) -#ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS #pragma code_page(1252) -#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // Dialog // -IDD_OPTNET DIALOGEX 0, 0, 314, 203 +IDD_OPTNET DIALOGEX 0, 0, 323, 203 STYLE DS_SETFONT | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - RTEXT "Server name:",IDC_STATIC,14,61,49,8 - EDITTEXT IDC_ED_SNAME,70,57,92,14,ES_AUTOHSCROLL - RTEXT "Port:",IDC_STATIC,14,81,49,8 + GROUPBOX "Connection",IDC_STATIC,7,7,153,91 + RTEXT "ID:",IDC_STATIC,10,17,54,8 + EDITTEXT IDC_ED_NAME,70,13,85,14,ES_AUTOHSCROLL + RTEXT "Password:",IDC_STATIC,10,39,54,8 + EDITTEXT IDC_ED_PWORD,70,35,85,14,ES_PASSWORD | ES_AUTOHSCROLL + RTEXT "Server name:",IDC_STATIC,10,61,54,8 + EDITTEXT IDC_ED_SNAME,70,57,85,14,ES_AUTOHSCROLL + RTEXT "Port:",IDC_STATIC,10,81,54,8 EDITTEXT IDC_ED_PORT,70,77,36,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + GROUPBOX "Client ID",IDC_STATIC,7,98,153,44 + COMBOBOX IDC_CMB_CLIENT,10,109,110,107,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_ED_CLIENTID,126,109,29,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Use old client version",IDC_CHK_OLDDEFAULTVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,127,145,11 + GROUPBOX "Error display",IDC_STATIC,7,143,153,53 + CONTROL "Use message boxes",IDC_RAD_ERRMB,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,156,145,10 + CONTROL "Use popups",IDC_RAD_ERRPOP,"Button",BS_AUTORADIOBUTTON,10,169,145,10 + CONTROL "Use system tray baloons",IDC_RAD_ERRBAL,"Button",BS_AUTORADIOBUTTON,10,182,145,10 + GROUPBOX "Contacts",IDC_STATIC,166,7,150,91 CONTROL "Get contacts from server",IDC_CHK_GETSERVERCONTACTS, - "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,180,15,115,15 - PUSHBUTTON "Upload contacts",IDC_BTN_UPLOADCONTACTS,180,29,115,15 - PUSHBUTTON "Import from file...",IDC_BTN_IMPORTCONTACTS,180,48,115,15 - COMBOBOX IDC_CMB_CLIENT,10,109,114,107,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_ED_CLIENTID,126,109,37,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - RTEXT "ID:",IDC_STATIC,14,17,49,8 - EDITTEXT IDC_ED_NAME,70,13,92,14,ES_AUTOHSCROLL - RTEXT "Password:",IDC_STATIC,14,39,49,8 - EDITTEXT IDC_ED_PWORD,70,35,92,14,ES_PASSWORD | ES_AUTOHSCROLL - GROUPBOX "Error display",IDC_STATIC,7,143,161,53 - CONTROL "Use message boxes",IDC_RAD_ERRMB,"Button",BS_AUTORADIOBUTTON | WS_GROUP,20,156,122,10 - CONTROL "Use popups",IDC_RAD_ERRPOP,"Button",BS_AUTORADIOBUTTON,20,169,122,10 - CONTROL "Use system tray baloons",IDC_RAD_ERRBAL,"Button",BS_AUTORADIOBUTTON,21,182,122,10 - GROUPBOX "Connection",IDC_STATIC,7,7,161,91 - GROUPBOX "Contacts",IDC_STATIC,172,7,135,91 - GROUPBOX "Client ID",IDC_STATIC,7,98,161,44 - CONTROL "Auto-add new contacts",IDC_CHK_ADDCONTACTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,67,115,11 - GROUPBOX "Encryption",IDC_STATIC,172,98,135,44 - CONTROL "40 or 128 bit",IDC_RAD_ENC,"Button",BS_AUTORADIOBUTTON | WS_GROUP,190,113,88,10 - CONTROL "None",IDC_RAD_NOENC,"Button",BS_AUTORADIOBUTTON,190,126,88,10 - CTEXT "Static",IDC_ST_CLIENTVER,185,165,102,12,SS_SUNKEN - CTEXT "Static",IDC_ST_SERVERVER,185,180,102,12,SS_SUNKEN - CONTROL "Treat 'idle' as 'away'",IDC_CHK_IDLEAWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,81,115,11 - CTEXT "Meanwhile lib ver: 1.0.2",IDC_ST_LIBVER,185,150,102,12 - GROUPBOX "",IDC_STATIC,172,143,135,53 - CONTROL "Use old client version",IDC_CHK_OLDDEFAULTVER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,33,127,115,11 + "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,171,15,139,15 + PUSHBUTTON "Upload contacts",IDC_BTN_UPLOADCONTACTS,171,29,139,15 + PUSHBUTTON "Import from file...",IDC_BTN_IMPORTCONTACTS,171,48,139,15 + CONTROL "Auto-add new contacts",IDC_CHK_ADDCONTACTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,171,67,139,11 + CONTROL "Treat 'idle' as 'away'",IDC_CHK_IDLEAWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,171,81,139,11 + GROUPBOX "Encryption",IDC_STATIC,166,98,150,44 + CONTROL "40 or 128 bit",IDC_RAD_ENC,"Button",BS_AUTORADIOBUTTON | WS_GROUP,171,113,139,10 + CONTROL "None",IDC_RAD_NOENC,"Button",BS_AUTORADIOBUTTON,171,126,139,10 + GROUPBOX "",IDC_STATIC,166,143,150,53 + CTEXT "Meanwhile lib ver: 1.0.2",IDC_ST_LIBVER,171,150,139,12 + CTEXT "Disconnected",IDC_ST_CLIENTVER,171,165,139,12,SS_SUNKEN + CTEXT "Disconnected",IDC_ST_SERVERVER,171,180,139,12,SS_SUNKEN END -IDD_SESSIONANNOUNCE DIALOG 0, 0, 286, 263 +IDD_SESSIONANNOUNCE DIALOGEX 0, 0, 286, 263 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Send announcement" -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,95,242,50,14 PUSHBUTTON "Cancel",IDCANCEL,150,242,50,14 @@ -74,10 +73,10 @@ BEGIN LTEXT "Message text:",IDC_STATIC,9,9,142,8 CONTROL "List1",IDC_LST_ANTO,"SysListView32",LVS_REPORT | WS_BORDER | WS_TABSTOP,10,92,197,132 PUSHBUTTON "Select all",IDC_BUT_SELALL,214,122,58,36 - PUSHBUTTON "Invert\n selection",IDC_BUT_SELINV,214,167,58,36,BS_MULTILINE + PUSHBUTTON "Invert\nselection",IDC_BUT_SELINV,214,167,58,36,BS_MULTILINE END -IDD_USERSEARCH DIALOG 0, 0, 155, 86 +IDD_USERSEARCH DIALOG 0, 0, 155, 86 STYLE DS_SETFONT | WS_POPUP FONT 8, "MS Sans Serif" BEGIN @@ -92,12 +91,20 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO +GUIDELINES DESIGNINFO BEGIN IDD_OPTNET, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 307 + RIGHTMARGIN, 316 + VERTGUIDE, 10 + VERTGUIDE, 64 + VERTGUIDE, 70 + VERTGUIDE, 155 + VERTGUIDE, 160 + VERTGUIDE, 166 + VERTGUIDE, 171 + VERTGUIDE, 310 TOPMARGIN, 7 BOTTOMMARGIN, 196 END 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; diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index 87bf29c5d9..133d173ffa 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -76,10 +76,10 @@ INT_PTR CSametimeProto::SametimeLoadIcon(WPARAM wParam, LPARAM lParam) id = IDI_ICON_PROTO; break; default: - return (int) (HICON) NULL; + return NULL; } - return (int) LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, + return (INT_PTR) LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, GetSystemMetrics(wParam & PLIF_SMALL ? SM_CXSMICON : SM_CXICON), GetSystemMetrics(wParam & PLIF_SMALL ? SM_CYSMICON : SM_CYICON), 0); return 0; @@ -126,7 +126,7 @@ void ReleaseIconEx(const char* name, BOOL big) // Copied from MSN plugin - sent acks need to be from different thread -void __cdecl sttFakeAckInfoSuccessThread(void* param) +void __cdecl sttFakeAckInfoSuccessThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; @@ -140,7 +140,7 @@ void __cdecl sttFakeAckInfoSuccessThread(void* param) return; } -void __cdecl sttFakeAckMessageSuccessThread(void* param) +void __cdecl sttFakeAckMessageSuccessThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; @@ -154,7 +154,7 @@ void __cdecl sttFakeAckMessageSuccessThread(void* param) return; } -void __cdecl sttFakeAckMessageFailedThread(void* param) +void __cdecl sttFakeAckMessageFailedThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; @@ -168,7 +168,7 @@ void __cdecl sttFakeAckMessageFailedThread(void* param) return; } -void __cdecl sttRecvAwayThread(void* param) +void __cdecl sttRecvAwayThread(void *param) { TFakeAckParams* tParam = (TFakeAckParams*)param; CSametimeProto* proto = tParam->proto; @@ -183,7 +183,7 @@ void __cdecl sttRecvAwayThread(void* param) } -int CSametimeProto::OnWindowEvent(WPARAM wParam, LPARAM lParam) +int CSametimeProto::OnWindowEvent(WPARAM, LPARAM lParam) { MessageWindowEventData* mwed = (MessageWindowEventData*)lParam; @@ -196,7 +196,7 @@ int CSametimeProto::OnWindowEvent(WPARAM wParam, LPARAM lParam) return 0; } -int CSametimeProto::OnIdleChanged(WPARAM wParam, LPARAM lParam) +int CSametimeProto::OnIdleChanged(WPARAM, LPARAM lParam) { if (!(lParam & IDF_PRIVACY)) { is_idle = lParam & IDF_ISIDLE ? true : false; @@ -217,7 +217,7 @@ int CSametimeProto::OnPreShutdown(WPARAM wParam, LPARAM lParam) } -int CSametimeProto::OnSametimeContactDeleted(WPARAM wParam, LPARAM lParam) +int CSametimeProto::OnSametimeContactDeleted(WPARAM wParam, LPARAM) { MCONTACT hContact = wParam; ContactDeleted(hContact); -- cgit v1.2.3