From d9fddc0cfa9066eb1b5ad3f4807b37426ae6ca88 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Mar 2019 21:10:22 +0300 Subject: Popup: - wiping out checks for service presence; - code cleaning --- protocols/SkypeWeb/src/skype_popups.cpp | 43 ++++++++++++++------------------- 1 file changed, 18 insertions(+), 25 deletions(-) (limited to 'protocols/SkypeWeb/src') diff --git a/protocols/SkypeWeb/src/skype_popups.cpp b/protocols/SkypeWeb/src/skype_popups.cpp index e20178b2a5..ba00d60709 100644 --- a/protocols/SkypeWeb/src/skype_popups.cpp +++ b/protocols/SkypeWeb/src/skype_popups.cpp @@ -47,35 +47,28 @@ void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *messag if (Miranda_IsTerminated()) return; - if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { - CMStringA className(FORMAT, "%s_", m_szModuleName); + CMStringA className(FORMAT, "%s_", m_szModuleName); - switch (type) { - case 1: - className.Append("Error"); - break; - - case SKYPE_DB_EVENT_TYPE_INCOMING_CALL: - className.Append("Call"); - break; - - default: - className.Append("Notification"); - break; - } + switch (type) { + case 1: + className.Append("Error"); + break; - POPUPDATACLASS ppd = { sizeof(ppd) }; - ppd.pwszTitle = caption; - ppd.pwszText = message; - ppd.pszClassName = className.GetBuffer(); - ppd.hContact = hContact; + case SKYPE_DB_EVENT_TYPE_INCOMING_CALL: + className.Append("Call"); + break; - CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd); - } - else { - DWORD mtype = MB_OK | MB_SETFOREGROUND | MB_ICONSTOP; - MessageBox(nullptr, message, caption, mtype); + default: + className.Append("Notification"); + break; } + + POPUPDATACLASS ppd = { sizeof(ppd) }; + ppd.pwszTitle = caption; + ppd.pwszText = message; + ppd.pszClassName = className.GetBuffer(); + ppd.hContact = hContact; + CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd); } void CSkypeProto::ShowNotification(const wchar_t *message, MCONTACT hContact) -- cgit v1.2.3