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/BasicHistory/src/Options.cpp | 4 ---- plugins/BasicHistory/src/Scheduler.cpp | 13 +------------ 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'plugins/BasicHistory') diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 82fe319919..8e97f38438 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -21,7 +21,6 @@ along with this program. If not, see . #include "resource.h" extern bool g_SmileyAddAvail; -extern bool bPopupsEnabled; Options *Options::instance; @@ -1431,9 +1430,6 @@ INT_PTR CALLBACK Options::DlgProcOptsScheduler(HWND hwndDlg, UINT msg, WPARAM wP for (std::list::iterator it = tasks->begin(); it != tasks->end(); ++it) ListBox_AddString(listTasks, it->taskName.c_str()); - if (!bPopupsEnabled) - EnableWindow(GetDlgItem(hwndDlg, IDC_SCHEDULER_ALERTS), FALSE); - CheckDlgButton(hwndDlg, IDC_SCHEDULER_ALERTS, instance->schedulerAlerts ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SCHEDULER_HISTORY_ALERTS, instance->schedulerHistoryAlerts ? BST_CHECKED : BST_UNCHECKED); diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 9a6ceaee02..a080d18e0e 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -21,7 +21,6 @@ along with this program. If not, see . #include "ExportManager.h" #include "HistoryWindow.h" -bool bPopupsEnabled; bool DoTask(TaskOptions& to); bool IsValidTask(TaskOptions& to, std::list* top = nullptr, std::wstring* err = nullptr, std::wstring* errDescr = nullptr); std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, std::map& existingContacts, bool replaceContact); @@ -65,8 +64,6 @@ static int OnShutdown(WPARAM, LPARAM) void InitScheduler() { - bPopupsEnabled = ServiceExists(MS_POPUP_ADDPOPUPW) || ServiceExists(MS_POPUP_ADDPOPUPCLASS); - POPUPCLASS test = { sizeof(test) }; test.flags = PCF_UNICODE; test.hIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY); @@ -1297,14 +1294,6 @@ void DoError(const TaskOptions& to, const std::wstring _error) if (Miranda_IsTerminated()) return; - if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) - ShowClassPopupW(MODULENAME, msg, _error.c_str()); - else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { - POPUPDATAW ppd = { 0 }; - ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY); - wcscpy_s(ppd.lpwzContactName, msg); - wcscpy_s(ppd.lpwzText, _error.c_str()); - CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, 0); - } + ShowClassPopupW(MODULENAME, msg, _error.c_str()); } } -- cgit v1.2.3