summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_utils.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-30 18:03:20 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-30 18:03:20 +0000
commit3a6ef3d8eebca078ff3eb424d56d483d256f4567 (patch)
tree548891344b1fd79af60fefdf850f1cdb4c9fbe0a /protocols/SkypeWeb/src/skype_utils.cpp
parentbf0b0f7a36ba4c55c014cdd0ee8e0827f6691692 (diff)
SkypeWeb: Popup on incoming call.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index 85c803cef9..d029be8cc3 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -453,7 +453,7 @@ int CSkypeProto::SkypeToMirandaStatus(const char *status)
return ID_STATUS_OFFLINE;
}
-void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact)
+void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact, int type)
{
if (Miranda_Terminated())
return;
@@ -462,9 +462,11 @@ void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, i
{
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
- mir_tstrcpy(ppd.lpwzContactName, caption);
- mir_tstrcpy(ppd.lpwzText, message);
+ _tcsncpy(ppd.lptzContactName, caption, MAX_CONTACTNAME);
+ _tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
ppd.lchIcon = Skin_GetIcon("Skype_main");
+ if (type == SKYPE_DB_EVENT_TYPE_INCOMING_CALL)
+ ppd.PluginWindowProc = PopupDlgProcCall;
if (!PUAddPopupT(&ppd))
return;
@@ -473,6 +475,22 @@ void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, i
MessageBox(NULL, message, caption, MB_OK | flags);
}
+LRESULT CSkypeProto::PopupDlgProcCall(HWND hPopup, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg) {
+ case WM_CONTEXTMENU:
+ PUDeletePopup(hPopup);
+ break;
+ case WM_COMMAND:
+ PUDeletePopup(hPopup);
+ CallService(MODULE"/IncomingCallPP", 0, PUGetContact(hPopup));
+
+ break;
+ }
+
+ return DefWindowProc(hPopup, uMsg, wParam, lParam);
+}
+
void CSkypeProto::ShowNotification(const TCHAR *message, int flags, MCONTACT hContact)
{
ShowNotification(_T(MODULE), message, flags, hContact);