summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/DbEditorPP/src/icons.cpp14
-rw-r--r--plugins/DbEditorPP/src/main.cpp6
-rw-r--r--plugins/DbEditorPP/src/stdafx.h1
3 files changed, 4 insertions, 17 deletions
diff --git a/plugins/DbEditorPP/src/icons.cpp b/plugins/DbEditorPP/src/icons.cpp
index 33e660743d..2ae251916a 100644
--- a/plugins/DbEditorPP/src/icons.cpp
+++ b/plugins/DbEditorPP/src/icons.cpp
@@ -1,6 +1,5 @@
#include "stdafx.h"
-
int dbeIcons[] = {
ICO_EMPTY,
ICO_BINARY,
@@ -18,8 +17,7 @@ int dbeIcons[] = {
ICO_OFFLINE
};
-
-IconItem iconList[] = {
+static IconItem iconList[] = {
{ LPGEN("Main icon"), "DBE++_0", ICO_DBE_BUTT },
{ LPGEN("Closed module"), "DBE++_1", ICO_CLOSED },
{ LPGEN("Open module"), "DBE++_2", ICO_OPENED },
@@ -38,16 +36,6 @@ IconItem iconList[] = {
{ LPGEN("Handle"), "DBE++_HANDLE", ICO_HANDLE }
};
-
-
-HANDLE GetIcoLibHandle(int icon)
-{
- for (auto &it : iconList)
- if (it.defIconID == icon)
- return it.hIcolib;
- return INVALID_HANDLE_VALUE;
-}
-
void IcoLibRegister(void)
{
g_plugin.registerIcon(modFullname, iconList);
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 86d8116c54..564ed97d0f 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -90,7 +90,7 @@ static int OnTTBLoaded(WPARAM, LPARAM)
ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttb.pszService = "DBEditorpp/MenuCommand";
ttb.name = LPGEN("Database Editor++");
- ttb.hIconHandleUp = GetIcoLibHandle(ICO_DBE_BUTT);
+ ttb.hIconHandleUp = g_plugin.getIconHandle(ICO_DBE_BUTT);
ttb.pszTooltipUp = LPGEN("Open Database Editor");
hTTBButt = g_plugin.addTTB(&ttb);
return 0;
@@ -106,14 +106,14 @@ static int ModulesLoaded(WPARAM, LPARAM)
SET_UID(mi, 0xe298849c, 0x1a8c, 0x4fc7, 0xa0, 0xf4, 0x78, 0x18, 0xf, 0xe2, 0xf7, 0xc9);
mi.position = 1900000001;
- mi.hIcolibItem = GetIcoLibHandle(ICO_DBE_BUTT);
+ mi.hIcolibItem = g_plugin.getIconHandle(ICO_DBE_BUTT);
mi.name.a = modFullname;
mi.pszService = "DBEditorpp/MenuCommand";
Menu_AddMainMenuItem(&mi);
SET_UID(mi, 0x2fed8613, 0xac43, 0x4148, 0xbd, 0x5c, 0x44, 0x88, 0xaf, 0x68, 0x69, 0x10);
mi.root = nullptr;
- mi.hIcolibItem = GetIcoLibHandle(ICO_REGUSER);
+ mi.hIcolibItem = g_plugin.getIconHandle(ICO_REGUSER);
mi.name.a = LPGEN("Open user tree in DBE++");
mi.pszService = "DBEditorpp/MenuCommand";
hUserMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h
index d623275d4c..56f5fc0c08 100644
--- a/plugins/DbEditorPP/src/stdafx.h
+++ b/plugins/DbEditorPP/src/stdafx.h
@@ -291,7 +291,6 @@ int EnumResidentSettings(const char *module, ModuleSettingLL *msll);
int fixResidentSettings();
// icons
-HANDLE GetIcoLibHandle(int icon);
void IcoLibRegister();
HICON LoadSkinnedDBEIcon(int icon);
HIMAGELIST LoadIcons();