diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-29 21:26:28 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-29 21:26:28 +0000 |
commit | 53a415159610fdc005db6c3289bf614d25c3d78e (patch) | |
tree | 68ce63a44a12f53c1d5b114416b15966e7922371 | |
parent | 792732d7ef1ec4445f02e0b9c0b6eda6879db3a6 (diff) |
language only one
current version doesn't working
git-svn-id: http://svn.miranda-ng.org/main/trunk@4570 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Skype/res/Resource.rc | 8 | ||||
-rw-r--r-- | protocols/Skype/src/resource.h | 5 | ||||
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 12 |
3 files changed, 10 insertions, 15 deletions
diff --git a/protocols/Skype/res/Resource.rc b/protocols/Skype/res/Resource.rc index 7bcb2392a1..4c5eb2b759 100644 --- a/protocols/Skype/res/Resource.rc +++ b/protocols/Skype/res/Resource.rc @@ -116,12 +116,8 @@ BEGIN COMBOBOX IDC_GENDER,58,32,62,52,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
LTEXT "Homepage:",IDC_STATIC,6,119,51,8
EDITTEXT IDC_HOMEPAGE,58,117,159,12,ES_AUTOHSCROLL
- LTEXT "Language 1:",IDC_STATIC,6,47,51,8
- COMBOBOX IDC_LANGUAGE1,58,46,86,52,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "Language 2:",IDC_STATIC,5,62,51,8
- COMBOBOX IDC_LANGUAGE2,58,60,85,52,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "Language 3:",IDC_STATIC,5,76,51,8
- COMBOBOX IDC_LANGUAGE3,58,74,85,52,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Language:",IDC_STATIC,6,47,51,8
+ COMBOBOX IDC_LANGUAGE,58,46,86,52,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
LTEXT "About:",IDC_STATIC,5,90,51,8
EDITTEXT IDC_ABOUT,57,88,159,24,ES_MULTILINE | WS_VSCROLL
END
diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h index 683064baaf..57d21f5aab 100644 --- a/protocols/Skype/src/resource.h +++ b/protocols/Skype/src/resource.h @@ -50,10 +50,7 @@ #define IDC_BIRTH_YEAR 1028
#define IDC_GENDER 1029
#define IDC_HOMEPAGE 1030
-#define IDC_LANGUAGE1 1031
-#define IDC_LANGUAGE2 1032
-#define IDC_LANGUAGE3 1033
-#define IDC_HOMEPAGE2 1034
+#define IDC_LANGUAGE 1031
#define IDC_ABOUT 1034
// Next default values for new objects
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 1b7542f0bf..db11fcf337 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -420,12 +420,12 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam static INT_PTR CALLBACK PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
const unsigned long iPageId = 0;
- CSkypeProto* ppro = (CSkypeProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ CSkypeProto *ppro = (CSkypeProto *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
if (lParam) {
- ppro = (CSkypeProto*)lParam;
+ ppro = (CSkypeProto *)lParam;
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
@@ -453,12 +453,14 @@ static INT_PTR CALLBACK PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar }
+ wchar_t *lang = ::db_get_wsa(NULL, ppro->m_szModuleName, "Language1");
for (std::map<std::wstring, std::wstring>::iterator it = CSkypeProto::languages.begin(); it != CSkypeProto::languages.end(); ++it)
{
const wchar_t* value = it->second.c_str();
- SendMessage(GetDlgItem(hwndDlg, IDC_LANGUAGE1), CB_ADDSTRING, 0, (LPARAM)value);
- SendMessage(GetDlgItem(hwndDlg, IDC_LANGUAGE2), CB_ADDSTRING, 0, (LPARAM)value);
- SendMessage(GetDlgItem(hwndDlg, IDC_LANGUAGE3), CB_ADDSTRING, 0, (LPARAM)value);
+ SendMessage(GetDlgItem(hwndDlg, IDC_LANGUAGE), CB_ADDSTRING, 0, (LPARAM)TranslateTS(value));
+ if ( !lang || !::wcslen(lang))
+ if ( !lstrcmp(lang, value))
+ SetDlgItemText(hwndDlg, IDC_LANGUAGE, TranslateTS(value));
}
DBVARIANT dbv;
if ( !db_get_ts(NULL, ppro->m_szModuleName, "Nick", &dbv)) {
|