From 0a2bac03e5bae0e72f02dbb1c6c56b8ab3822024 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Nov 2024 16:39:44 +0300 Subject: SmileyAdd: another atavism removed --- plugins/ExternalAPI/m_smileyadd.h | 20 ------------------- plugins/SmileyAdd/src/services.cpp | 40 -------------------------------------- 2 files changed, 60 deletions(-) (limited to 'plugins') diff --git a/plugins/ExternalAPI/m_smileyadd.h b/plugins/ExternalAPI/m_smileyadd.h index 1667c678d7..f9bc17ea6a 100644 --- a/plugins/ExternalAPI/m_smileyadd.h +++ b/plugins/ExternalAPI/m_smileyadd.h @@ -50,26 +50,6 @@ struct SMADD_RICHEDIT #define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys" -///////////////////////////////////////////////////////////////////////////////////////// -// gets button smiley icon -// wParam = (WPARAM) 0; not used -// lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2 -// return: TRUE if API succeeded (all parameters were valid) , FALSE if not. - -struct SMADD_INFO -{ - char *Protocolname; - HICON ButtonIcon; // RETURN VALUE: this is filled with the icon handle - // of the smiley that can be used on the button - // if used with GETINFO2 handle must be destroyed by user! - // NULL if the buttonicon is not defined... - int NumberOfVisibleSmileys; // Number of visible smileys defined. - int NumberOfSmileys; // Number of total smileys defined -}; - -#define MS_SMILEYADD_GETINFO "SmileyAdd/GetInfo" -#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2" - ///////////////////////////////////////////////////////////////////////////////////////// // Event notifies that SmileyAdd options have changed // Message dialogs usually need to redraw it's content on reception of this event diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index efc8e2cb10..f7419c7b77 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -107,44 +107,6 @@ static INT_PTR ReplaceSmileysCommand(WPARAM, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// -static int GetInfoCommandE(SMADD_INFO *smre, bool retDup) -{ - if (smre == nullptr) - return FALSE; - - SmileyPackType *SmileyPack = FindSmileyPack(smre->Protocolname); - if (SmileyPack == nullptr || SmileyPack->SmileyCount() == 0) { - smre->ButtonIcon = nullptr; - smre->NumberOfSmileys = 0; - smre->NumberOfVisibleSmileys = 0; - return FALSE; - } - - SmileyType *sml = FindButtonSmiley(SmileyPack); - - if (sml != nullptr) - smre->ButtonIcon = retDup ? sml->GetIconDup() : sml->GetIcon(); - else - smre->ButtonIcon = GetDefaultIcon(retDup); - - smre->NumberOfSmileys = SmileyPack->SmileyCount(); - smre->NumberOfVisibleSmileys = SmileyPack->VisibleSmileyCount(); - - return TRUE; -} - -static INT_PTR GetInfoCommand(WPARAM, LPARAM lParam) -{ - return GetInfoCommandE((SMADD_INFO*)lParam, false); -} - -static INT_PTR GetInfoCommand2(WPARAM, LPARAM lParam) -{ - return GetInfoCommandE((SMADD_INFO*)lParam, true); -} - -///////////////////////////////////////////////////////////////////////////////////////// - static INT_PTR ParseTextBatch(WPARAM, LPARAM lParam) { SMADD_BATCHPARSE *smre = (SMADD_BATCHPARSE*)lParam; @@ -406,8 +368,6 @@ void InitServices() HookEvent(ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu); CreateServiceFunction(MS_SMILEYADD_REPLACESMILEYS, ReplaceSmileysCommand); - CreateServiceFunction(MS_SMILEYADD_GETINFO, GetInfoCommand); - CreateServiceFunction(MS_SMILEYADD_GETINFO2, GetInfoCommand2); CreateServiceFunction(MS_SMILEYADD_REGISTERCATEGORY, RegisterPack); CreateServiceFunction(MS_SMILEYADD_BATCHPARSE, ParseTextBatch); CreateServiceFunction(MS_SMILEYADD_BATCHFREE, FreeTextBatch); -- cgit v1.2.3