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/NewEventNotify/src/options.cpp | 17 +++++++---------- plugins/NewEventNotify/src/popup.cpp | 10 ++++------ 2 files changed, 11 insertions(+), 16 deletions(-) (limited to 'plugins/NewEventNotify/src') diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp index a3c3a39373..9847c32859 100644 --- a/plugins/NewEventNotify/src/options.cpp +++ b/plugins/NewEventNotify/src/options.cpp @@ -263,16 +263,13 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, L int OptionsAdd(WPARAM addInfo, LPARAM) { - if (ServiceExists(MS_POPUP_ADDPOPUPW)) { - OPTIONSDIALOGPAGE odp = {}; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT); - odp.szTitle.a = LPGEN("Event Notify"); - odp.szGroup.a = LPGEN("Popups"); - odp.flags = ODPF_BOLDGROUPS; - odp.pfnDlgProc = OptionsDlgProc; - g_plugin.addOptions(addInfo, &odp); - } - + OPTIONSDIALOGPAGE odp = {}; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT); + odp.szTitle.a = LPGEN("Event Notify"); + odp.szGroup.a = LPGEN("Popups"); + odp.flags = ODPF_BOLDGROUPS; + odp.pfnDlgProc = OptionsDlgProc; + g_plugin.addOptions(addInfo, &odp); return 0; } diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 92540ab0b0..c556b04c41 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -406,12 +406,10 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) PopupList[NumberPopupData(NULL, -1)] = pdata; // send data to popup plugin - if (ServiceExists(MS_POPUP_ADDPOPUPW)) { - // popup creation failed, release popupdata - if (PUAddPopupW(&pudw) < 0) { - FreePopupEventData(pdata); - mir_free(pdata); - } + // popup creation failed, release popupdata + if (PUAddPopupW(&pudw) < 0) { + FreePopupEventData(pdata); + mir_free(pdata); } if (dbe.pBlob) -- cgit v1.2.3