diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-04 15:29:02 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-04 15:29:02 +0000 |
commit | 7240ecc8765461bddbd49dd120bf224bc96e2fa0 (patch) | |
tree | b328825ac126b6dc004338db37a06d993861a7d1 /protocols/SkypeWeb/src/skype_utils.cpp | |
parent | 8866bd1781848c32d92216cba2f79417f3e5338b (diff) |
SkypeWeb: Popup classes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13421 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.cpp | 66 |
1 files changed, 20 insertions, 46 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 0b35bf7803..eb132943a7 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -457,54 +457,27 @@ void CSkypeProto::ShowNotification(const TCHAR *caption, const TCHAR *message, i {
if (Miranda_Terminated())
return;
+
+ if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
+ CMStringA className(FORMAT, "%s_", m_szModuleName);
- if (ServiceExists(MS_POPUP_ADDPOPUPT))
- {
- POPUPDATAT ppd = { 0 };
- ppd.lchContact = hContact;
- _tcsncpy(ppd.lptzContactName, caption, MAX_CONTACTNAME);
- _tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (type == SKYPE_DB_EVENT_TYPE_INCOMING_CALL)
- {
- ppd.lchIcon = Skin_GetIconByHandle(GetIconHandle("inc_call"));
- ppd.PluginWindowProc = PopupDlgProcCall;
- }
- else
- ppd.lchIcon = Skin_GetIcon("Skype_main");
+ className.Append("Call");
+ else
+ className.Append("Notification");
- if (!PUAddPopupT(&ppd))
- return;
- }
- /*
- if (ServiceExists(MS_POPUP_ADDPOPUPT))
- {
- if (type == SKYPE_DB_EVENT_TYPE_INCOMING_CALL)
- {
- char className[256];
-
- POPUPDATACLASS ppd = { 0 };
- ppd.ptszTitle = caption;
- ppd.ptszText = message;
- ppd.hContact = hContact;
- ppd.pszClassName = className;
- mir_snprintf(className, SIZEOF(className), "%s_%s", m_szModuleName, "Call");
- CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
- return;
- }
- else
- {
- POPUPDATAT ppd = { 0 };
- ppd.lchContact = hContact;
- _tcsncpy(ppd.lptzContactName, caption, MAX_CONTACTNAME);
- _tcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
- ppd.lchIcon = Skin_GetIcon("Skype_main");
- PUAddPopupT(&ppd);
- return;
- }
- }*/
+ POPUPDATACLASS ppd = { sizeof(ppd) };
+ ppd.ptszTitle = caption;
+ ppd.ptszText = message;
+ ppd.pszClassName = className.GetBuffer();
+ ppd.hContact = hContact;
-
- MessageBox(NULL, message, caption, MB_OK | flags);
+ CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
+ }
+ else {
+ DWORD mtype = MB_OK | MB_SETFOREGROUND | MB_ICONSTOP;
+ MessageBox(NULL, message, caption, mtype);
+ }
}
LRESULT CSkypeProto::PopupDlgProcCall(HWND hPopup, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -642,8 +615,9 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) }
if (!_tcsicmp(szCommand, _T("sendfile")))
{
- MCONTACT hContact = AddContact(_T2A(szJid), true);
- CallService(MS_FILE_SENDFILE, hContact, NULL);
+ //CONTACT hContact = AddContact(_T2A(szJid), true);
+ //CallService(MS_FILE_SENDFILE, hContact, NULL);
+ return 1;
}
if (!_tcsicmp(szCommand, _T("voicemail")))
{
|