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/SecureIM/src/commonheaders.cpp | 1 - plugins/SecureIM/src/commonheaders.h | 1 - plugins/SecureIM/src/crypt_popups.cpp | 2 -- plugins/SecureIM/src/main.cpp | 9 --------- plugins/SecureIM/src/options.cpp | 10 ++++------ 5 files changed, 4 insertions(+), 19 deletions(-) (limited to 'plugins/SecureIM/src') diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index 98ce15c35f..b0e258eadd 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -15,7 +15,6 @@ HICON g_hICO[ICO_CNT], g_hPOP[POP_CNT], g_hIEC[1 + IEC_CNT*MODE_CNT] = {}; HANDLE g_IEC[1 + IEC_CNT*MODE_CNT]; int iBmpDepth; -BOOL bPopupExists = false; BOOL bPGPloaded = false, bPGPkeyrings = false, bUseKeyrings = false, bPGPprivkey = false; BOOL bGPGloaded = false, bGPGkeyrings = false, bSavePass = false; BOOL bSFT, bSOM, bASI, bMCD, bSCM, bDGP, bAIP, bNOL, bAAK, bMCM; diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h index abe1b2f5ad..e2ac1fcc5f 100644 --- a/plugins/SecureIM/src/commonheaders.h +++ b/plugins/SecureIM/src/commonheaders.h @@ -85,7 +85,6 @@ extern int iService, iHook; extern HICON g_hICO[ICO_CNT], g_hIEC[1+IEC_CNT*MODE_CNT], g_hPOP[POP_CNT]; extern HANDLE g_IEC[1+IEC_CNT*MODE_CNT]; extern int iBmpDepth; -extern BOOL bPopupExists; extern BOOL bPGPloaded, bPGPkeyrings, bUseKeyrings, bPGPprivkey; extern BOOL bGPGloaded, bGPGkeyrings, bSavePass; extern BOOL bSFT, bSOM, bASI, bMCD, bSCM, bDGP, bAIP, bNOL, bAAK, bMCM; diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp index f50b5e308f..98da4619ec 100644 --- a/plugins/SecureIM/src/crypt_popups.cpp +++ b/plugins/SecureIM/src/crypt_popups.cpp @@ -6,8 +6,6 @@ void showPopup(LPCSTR lpzText, MCONTACT hContact, HICON hIcon, UINT type) { - if (!bPopupExists) return; - COLORREF colorBack, colorText; int timeout = 0; diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 5133342c1f..010a065109 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -50,12 +50,6 @@ static HGENMENU MyAddSubItem(HGENMENU hRoot, LPCSTR name, int pos, int poppos, L return res; } -static int onModuleLoad(WPARAM, LPARAM) -{ - bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPW); - return 0; -} - static int onModulesLoaded(WPARAM, LPARAM) { InitNetlib(); @@ -64,7 +58,6 @@ static int onModulesLoaded(WPARAM, LPARAM) InitIcons(); GetFlags(); - onModuleLoad(0, 0); // RSA/AES Sent_NetLog("rsa_init"); @@ -316,8 +309,6 @@ int CMPlugin::Load(void) // hook events HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded); HookEvent(ME_SYSTEM_PRESHUTDOWN, onShutdown); - HookEvent(ME_SYSTEM_MODULELOAD, onModuleLoad); - HookEvent(ME_SYSTEM_MODULEUNLOAD, onModuleLoad); HookEvent(ME_OPT_INITIALISE, onRegisterOptions); g_hEvent[0] = CreateHookableEvent(MODULENAME"/Disabled"); diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 1104b30e18..de2c241c46 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1694,11 +1694,9 @@ int onRegisterOptions(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = OptionsDlgProc; g_plugin.addOptions(wParam, &odp); - if (bPopupExists) { - odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUP); - odp.szGroup.a = LPGEN("Popups"); - odp.pfnDlgProc = PopOptionsDlgProc; - g_plugin.addOptions(wParam, &odp); - } + odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUP); + odp.szGroup.a = LPGEN("Popups"); + odp.pfnDlgProc = PopOptionsDlgProc; + g_plugin.addOptions(wParam, &odp); return 0; } -- cgit v1.2.3