summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_events.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-05-08 17:06:19 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-05-08 17:06:19 +0000
commitee784358546b653f5bafa79f1a61179608b4751a (patch)
tree31dc97951ee284af9b7d627881f972b1ef1dd2dc /protocols/Skype/src/skype_events.cpp
parent48d039b89c61a20556a0b063974d84d7d7c67c8d (diff)
- code restructurization
- own info saving on server now git-svn-id: http://svn.miranda-ng.org/main/trunk@4600 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_events.cpp')
-rw-r--r--protocols/Skype/src/skype_events.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp
index ca54a4904d..aaa5855ee3 100644
--- a/protocols/Skype/src/skype_events.cpp
+++ b/protocols/Skype/src/skype_events.cpp
@@ -107,6 +107,52 @@ int __cdecl CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
return 0;
}
+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_USERINFOTAB | ODPF_DONTTRANSLATE;
+ odp.hInstance = g_hInstance;
+ odp.dwInitParam = LPARAM(this);
+ odp.position = -1900000000;
+ odp.ptszTitle = this->m_tszUserName;
+
+ HANDLE hContact = (HANDLE)lParam;
+ if (hContact)
+ {
+ char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ if (szProto != NULL && !strcmp(szProto, m_szModuleName))
+ {
+ odp.pfnDlgProc = SkypeDlgProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SKYPE);
+ UserInfo_AddPage(wParam, &odp);
+ }
+ }
+ else
+ {
+ NeedUpdate = 0;
+ odp.pfnDlgProc = ContactSkypeDlgProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OWNINFO_CONTACT);
+ odp.ptszTab = LPGENT("Contacts");
+ UserInfo_AddPage(wParam, &odp);
+
+ odp.pfnDlgProc = HomeSkypeDlgProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OWNINFO_HOME);
+ odp.ptszTab = LPGENT("Home");
+ UserInfo_AddPage(wParam, &odp);
+
+ odp.pfnDlgProc = PersonalSkypeDlgProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OWNINFO_PERSONAL);
+ odp.ptszTab = LPGENT("General");
+ UserInfo_AddPage(wParam, &odp);
+ }
+
+ return 0;
+}
+
int __cdecl CSkypeProto::OnSrmmWindowOpen(WPARAM, LPARAM lParam)
{
MessageWindowEventData *ev = (MessageWindowEventData*)lParam;