summaryrefslogtreecommitdiff
path: root/plugins/SimpleStatusMsg/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-12 21:44:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-12 21:44:59 +0300
commit09906f1d7495384fc11033cdcef7022e8f100181 (patch)
tree277fa88419a8e76dea20750434a446f3c3136a97 /plugins/SimpleStatusMsg/src/utils.cpp
parentf2510ca8e3bfad13a68d3ba7262cc38c471f9878 (diff)
wiping custom icolib functions: simplestatusmsg
Diffstat (limited to 'plugins/SimpleStatusMsg/src/utils.cpp')
-rw-r--r--plugins/SimpleStatusMsg/src/utils.cpp31
1 files changed, 7 insertions, 24 deletions
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<void> 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<void> 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) {