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 /protocols/Skype/src | |
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
Diffstat (limited to 'protocols/Skype/src')
-rw-r--r-- | protocols/Skype/src/resource.h | 5 | ||||
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 12 |
2 files changed, 8 insertions, 9 deletions
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)) {
|