summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_dialogs.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-10-30 18:59:52 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-10-30 18:59:52 +0000
commitb35ee0b14ec252c54e122a563404c4b808edcf3b (patch)
tree317a72a2111a7b2ac99f72760976ffa72cd6dd1d /protocols/Skype/src/skype_dialogs.cpp
parent7d6632d24db3879fc37c026d80920af3a5395359 (diff)
added page in userinfo with additional data
git-svn-id: http://svn.miranda-ng.org/main/trunk@2116 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_dialogs.cpp')
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index 600007d25f..89b4214489 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -233,7 +233,77 @@ int __cdecl CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
return 0;
}
+static INT_PTR CALLBACK SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ break;
+
+ case WM_NOTIFY:
+ switch (((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_PARAMCHANGED:
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (( PSHNOTIFY* )lParam )->lParam );
+ break;
+
+ case PSN_INFOCHANGED:
+ {
+ CSkypeProto* ppro = (CSkypeProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ if (!ppro)
+ break;
+
+ char* szProto;
+ HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
+
+ if (hContact == NULL)
+ szProto = ppro->m_szModuleName;
+ else
+ szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+
+ if (!szProto)
+ break;
+
+ //SetDlgItemText(GetDlgItem(hwndDlg, IDC_SID), IDC_SID, ppro->GetSettingString(hContact, "sid"));
+ //SetDlgItemText(GetDlgItem(hwndDlg, IDC_STATUSTEXT), IDC_STATUSTEXT, ppro->GetSettingString(hContact, "XStatusMsg") ? ppro->GetSettingString(hContact, "XStatusMsg") : TranslateT("<not specified>"));
+ //SetDlgItemText(GetDlgItem(hwndDlg, IDC_ONLINESINCE), IDC_ONLINESINCE, ppro->GetSettingDword(hContact, "OnlineSinceTS") ? ppro->GetSettingString(hContact, "OnlineSinceTS") : TranslateT("<not specified>"));
+ //SetDlgItemText(GetDlgItem(hwndDlg, IDC_LASTEVENTDATE), IDC_LASTEVENTDATE, ppro->GetSettingDword(hContact, "LastEventDateTS") ? ppro->GetSettingString(hContact, "LastEventDateTS") : TranslateT("<not specified>"));
+ //SetDlgItemText(GetDlgItem(hwndDlg, IDC_LASTPROFILECHANGE), IDC_LASTPROFILECHANGE, ppro->GetSettingDword(hContact, "ProfileTS") ? ppro->GetSettingDword(hContact, "ProfileTS") : TranslateT("<not specified>"));
+ }
+ break;
+ }
+ break;
+ }
+ break;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDCANCEL:
+ SendMessage(GetParent(hwndDlg), msg, wParam, lParam);
+ break;
+ }
+ break;
+ }
+
+ return FALSE;
+}
+
int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
{
+ if ((!this->IsProtoContact((HANDLE)lParam)) && lParam)
+ return 0;
+
+ OPTIONSDIALOGPAGE odp = {0};
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.hInstance = g_hInstance;
+ odp.dwInitParam = LPARAM(this);
+ odp.pfnDlgProc = SkypeDlgProc;
+ odp.position = -1900000000;
+ odp.ptszTitle = m_tszUserName;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SKYPE);
+ UserInfo_AddPage(wParam, &odp);
+
return 0;
} \ No newline at end of file