summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-05-18 15:03:41 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-05-18 15:03:41 +0000
commit1e5e6e5b820861d32cddb5602e4b64c93f1b4ded (patch)
treecaa220fc438740ebb333ab510ecd26ff48fdda0b
parent985c131265ba78767854881853167551db45fbc4 (diff)
fixed skype contacts information corruption
git-svn-id: http://svn.miranda-ng.org/main/trunk@4719 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp36
1 files changed, 26 insertions, 10 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index 4e7f3c5438..41817a0c18 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -355,9 +355,16 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
break;
::SetDlgItemText(hwndDlg, IDC_SID, mir_ptr<wchar_t>(::db_get_wsa(hContact, ppro->m_szModuleName, SKYPE_SETTINGS_LOGIN)));
-
- ptrT statusMsg(::db_get_wsa(hContact, ppro->m_szModuleName, "XStatusMsg"));
- ::SetDlgItemText(hwndDlg, IDC_STATUSTEXT, statusMsg != NULL ? statusMsg : TranslateT("<not specified>"));
+
+ DBVARIANT dbv;
+ if ( !::db_get_ts(hContact, ppro->m_szModuleName, "XStatusMsg", &dbv)) {
+ ::SetDlgItemText(hwndDlg, IDC_STATUSTEXT, dbv.ptszVal);
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_STATUSTEXT), TRUE);
+ ::db_free(&dbv);
+ } else {
+ ::SetDlgItemText(hwndDlg, IDC_STATUSTEXT, TranslateT("<not specified>"));
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_STATUSTEXT), FALSE);
+ }
if (::db_get_dw(hContact, ppro->m_szModuleName, "OnlineSinceTS", 0)) {
TCHAR date[64];
@@ -367,8 +374,11 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
tts.cbDest = sizeof(date);
CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM)::db_get_dw(hContact, ppro->m_szModuleName, "OnlineSinceTS", 0), (LPARAM)&tts);
::SetDlgItemText(hwndDlg, IDC_ONLINESINCE, date);
- } else
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_ONLINESINCE), TRUE);
+ } else {
::SetDlgItemText(hwndDlg, IDC_ONLINESINCE, TranslateT("<not specified>"));
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_ONLINESINCE), FALSE);
+ }
if (::db_get_dw(hContact, ppro->m_szModuleName, "LastEventDateTS", 0)) {
TCHAR date[64];
@@ -378,8 +388,11 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
tts.cbDest = sizeof(date);
::CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM)::db_get_dw(hContact, ppro->m_szModuleName, "LastEventDateTS", 0), (LPARAM)&tts);
::SetDlgItemText(hwndDlg, IDC_LASTEVENTDATE, date);
- } else
- ::SetDlgItemText(hwndDlg, IDC_ONLINESINCE, TranslateT("<not specified>"));
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_LASTEVENTDATE), TRUE);
+ } else {
+ ::SetDlgItemText(hwndDlg, IDC_LASTEVENTDATE, TranslateT("<not specified>"));
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_LASTEVENTDATE), FALSE);
+ }
if (::db_get_dw(hContact, ppro->m_szModuleName, "ProfileTS", 0)) {
TCHAR date[64];
@@ -389,8 +402,11 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
tts.cbDest = sizeof(date);
::CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM)::db_get_dw(hContact, ppro->m_szModuleName, "ProfileTS", 0), (LPARAM)&tts);
::SetDlgItemText(hwndDlg, IDC_LASTPROFILECHANGE, date);
- } else
- ::SetDlgItemText(hwndDlg, IDC_ONLINESINCE, TranslateT("<not specified>"));
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_LASTPROFILECHANGE), TRUE);
+ } else {
+ ::SetDlgItemText(hwndDlg, IDC_LASTPROFILECHANGE, TranslateT("<not specified>"));
+ ::EnableWindow(::GetDlgItem(hwndDlg, IDC_LASTPROFILECHANGE), FALSE);
+ }
}
break;
}
@@ -537,7 +553,7 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA
::db_free(&dbv);
}
else
- ::SetDlgItemText(hwndDlg, IDC_ABOUT, _T(""));
+ ::SetDlgItemText(hwndDlg, IDC_MOOD, _T(""));
}
break;
@@ -675,7 +691,7 @@ INT_PTR CALLBACK CSkypeProto::HomeSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
::db_free(&dbv);
}
else
- ::SetDlgItemText(hwndDlg, IDC_MOBPHONE, _T(""));
+ ::SetDlgItemText(hwndDlg, IDC_CITY, _T(""));
if ( !::db_get_ts(NULL, ppro->m_szModuleName, "State", &dbv)) {
::SetDlgItemText(hwndDlg, IDC_STATE, dbv.ptszVal);