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 --- plugins/NewAwaySysMod/src/Notification.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'plugins/NewAwaySysMod/src') diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp index 3a55cc7798..e76ab4fdb9 100644 --- a/plugins/NewAwaySysMod/src/Notification.cpp +++ b/plugins/NewAwaySysMod/src/Notification.cpp @@ -23,17 +23,14 @@ void ShowMsg(wchar_t *FirstLine, wchar_t *SecondLine, bool IsErrorMsg, int Timeout) { - if (ServiceExists(MS_POPUP_ADDPOPUPW)) { - POPUPDATAW ppd = { 0 }; - ppd.lchIcon = LoadIcon(nullptr, IsErrorMsg ? IDI_EXCLAMATION : IDI_INFORMATION); - mir_wstrncpy(ppd.lpwzContactName, FirstLine, MAX_CONTACTNAME); - mir_wstrncpy(ppd.lpwzText, SecondLine, MAX_SECONDLINE); - ppd.colorBack = IsErrorMsg ? 0x0202E3 : 0xE8F1FD; - ppd.colorText = IsErrorMsg ? 0xE8F1FD : 0x000000; - ppd.iSeconds = Timeout; - PUAddPopupW(&ppd); - } - else MessageBox(nullptr, SecondLine, FirstLine, MB_OK | (IsErrorMsg ? MB_ICONEXCLAMATION : MB_ICONINFORMATION)); + POPUPDATAW ppd = { 0 }; + ppd.lchIcon = LoadIcon(nullptr, IsErrorMsg ? IDI_EXCLAMATION : IDI_INFORMATION); + mir_wstrncpy(ppd.lpwzContactName, FirstLine, MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzText, SecondLine, MAX_SECONDLINE); + ppd.colorBack = IsErrorMsg ? 0x0202E3 : 0xE8F1FD; + ppd.colorText = IsErrorMsg ? 0xE8F1FD : 0x000000; + ppd.iSeconds = Timeout; + PUAddPopupW(&ppd); } void ShowLog(TCString &LogFilePath) -- cgit v1.2.3