From 09906f1d7495384fc11033cdcef7022e8f100181 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 12 Apr 2019 21:44:59 +0300 Subject: wiping custom icolib functions: simplestatusmsg --- plugins/SimpleStatusMsg/src/utils.cpp | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'plugins/SimpleStatusMsg/src/utils.cpp') diff --git a/plugins/SimpleStatusMsg/src/utils.cpp b/plugins/SimpleStatusMsg/src/utils.cpp index 00e507f834..a3ba96c977 100644 --- a/plugins/SimpleStatusMsg/src/utils.cpp +++ b/plugins/SimpleStatusMsg/src/utils.cpp @@ -20,8 +20,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "stdafx.h" -static LIST arProtoHooks(5); - static IconItem iconList[] = { { LPGEN("Delete selected"), "cross", IDI_CROSS }, @@ -30,7 +28,7 @@ static IconItem iconList[] = { LPGEN("Add to predefined"), "add", IDI_PLUS }, { LPGEN("Clear history"), "clear", IDI_CHIST }, { LPGEN("Copy Away message"), "copy", IDI_COPY }, - { LPGEN("Change status message"), "csmsg", IDI_CSMSG, }, + { LPGEN("Change status message"), "csmsg", IDI_CSMSG }, { LPGEN("Go to URL in Away message"), "gotourl", IDI_GOTOURL } }; @@ -39,28 +37,9 @@ void IconsInit(void) g_plugin.registerIcon(LPGEN("Simple Status Message"), iconList, MODULENAME); } -HICON LoadIconEx(const char *name) -{ - char szSettingName[100]; - mir_snprintf(szSettingName, "SimpleStatusMsg_%s", name); - return IcoLib_GetIcon(szSettingName); -} - -HANDLE GetIconHandle(int iconId) -{ - for (int i = 0; i < _countof(iconList); i++) - if (iconList[i].defIconID == iconId) - return iconList[i].hIcolib; - - return nullptr; -} +///////////////////////////////////////////////////////////////////////////////////////// -void ReleaseIconEx(const char *name) -{ - char szSettingName[100]; - mir_snprintf(szSettingName, "SimpleStatusMsg_%s", name); - IcoLib_Release(szSettingName); -} +static LIST arProtoHooks(5); HANDLE HookProtoEvent(const char *szModule, const char *szEvent, MIRANDAHOOKPARAM hookProc) { @@ -78,7 +57,9 @@ void UnhookProtoEvents(void) arProtoHooks.destroy(); } +///////////////////////////////////////////////////////////////////////////////////////// // Generate random number in a specified range + int GetRandom(int from, int to) { if ((to - from) < 1) @@ -88,7 +69,9 @@ int GetRandom(int from, int to) return ((randnum % (to - from + 1)) + from); } +///////////////////////////////////////////////////////////////////////////////////////// // From SRAway module + const wchar_t *GetDefaultMessage(int status) { switch (status) { -- cgit v1.2.3