summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp18
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp66
2 files changed, 34 insertions, 50 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index f9b5ecfb52..b8d9009a6a 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -306,7 +306,7 @@ int CSkypeProto::OnPreShutdown(WPARAM, LPARAM)
void CSkypeProto::InitPopups()
{
- /*TCHAR desc[256];
+ TCHAR desc[256];
char name[256];
POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
@@ -318,7 +318,17 @@ void CSkypeProto::InitPopups()
ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("inc_call"));
ppc.colorBack = RGB(255, 255, 255);
ppc.colorText = RGB(0, 0, 0);
- ppc.iSeconds = 60;
- //ppc.PluginWindowProc = PopupDlgProcCall;
- m_hPopupClassCall = Popup_RegisterClass(&ppc);*/
+ ppc.iSeconds = 30;
+ ppc.PluginWindowProc = PopupDlgProcCall;
+ m_hPopupClassCall = Popup_RegisterClass(&ppc);
+
+ mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Notifications"));
+ mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Notification");
+ ppc.ptszDescription = desc;
+ ppc.pszName = name;
+ ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("main"));
+ ppc.colorBack = RGB(255, 255, 255);
+ ppc.colorText = RGB(0, 0, 0);
+ ppc.iSeconds = 5;
+ m_hPopupClassCall = Popup_RegisterClass(&ppc);
} \ No newline at end of file
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")))
{