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/PluginUpdater/src/DlgUpdate.cpp | 2 +- plugins/PluginUpdater/src/Notifications.cpp | 2 +- plugins/PluginUpdater/src/Options.cpp | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'plugins/PluginUpdater') diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index efa7d1f2de..98842ed9d6 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -469,7 +469,7 @@ static void DlgUpdateSilent(void *param) wchar_t tszTitle[100]; mir_snwprintf(tszTitle, TranslateT("%d component(s) was updated"), count); - if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) + if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) ShowPopup(tszTitle,TranslateT("You need to restart your Miranda to apply installed updates."),POPUP_TYPE_MSG); else { if (Clist_TrayNotifyW(MODULEA, tszTitle, TranslateT("You need to restart your Miranda to apply installed updates."), NIIF_INFO, 30000)) { diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp index 2306462636..e2d37d95bd 100644 --- a/plugins/PluginUpdater/src/Notifications.cpp +++ b/plugins/PluginUpdater/src/Notifications.cpp @@ -95,7 +95,7 @@ static LRESULT CALLBACK PopupDlgProcRestart(HWND hPopup, UINT uMsg, WPARAM wPara void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number) { - if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { + if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { char setting[100]; mir_snprintf(setting, "Popups%d", Number); diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index 560aa2bc90..31205b9a4d 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -565,12 +565,10 @@ int OptInit(WPARAM wParam, LPARAM) odp.pfnDlgProc = UpdateNotifyOptsProc; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPW)) { - odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP); - odp.szGroup.w = LPGENW("Popups"); - odp.szTitle.w = LPGENW("Plugin Updater"); - odp.pfnDlgProc = DlgPopupOpts; - g_plugin.addOptions(wParam, &odp); - } + odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP); + odp.szGroup.w = LPGENW("Popups"); + odp.szTitle.w = LPGENW("Plugin Updater"); + odp.pfnDlgProc = DlgPopupOpts; + g_plugin.addOptions(wParam, &odp); return 0; } -- cgit v1.2.3