summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewXstatusNotify/src/main.cpp')
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 0586311c5b..2440d90e84 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -1067,13 +1067,7 @@ void InitMainMenuItem()
hServiceMenu = (HANDLE)CreateServiceFunction(MS_STATUSCHANGE_MENUCOMMAND, EnableDisableMenuCommand);
}
-struct _tag_iconList
-{
- char *szDescr;
- char *szName;
- int iIconID;
-}
-static const iconList[] =
+static IconItem iconList[] =
{
{ "Notification enabled", ICO_NOTIFICATION_OFF, IDI_NOTIFICATION_OFF },
{ "Notification disabled", ICO_NOTIFICATION_ON, IDI_NOTIFICATION_ON }
@@ -1081,23 +1075,7 @@ static const iconList[] =
void InitIcolib()
{
- char szFile[MAX_PATH];
- char szSettingName[100];
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.cx = sid.cy = 16;
- sid.pszDefaultFile = szFile;
- sid.pszName = szSettingName;
- sid.pszSection = MODULE;
-
- GetModuleFileNameA(hInst, szFile, MAX_PATH);
-
- for (int i = 0; i < SIZEOF(iconList); i++) {
- mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", MODULE, iconList[i].szName);
- sid.pszDescription = Translate(iconList[i].szDescr);
- sid.iDefaultIndex = -iconList[i].iIconID;
- Skin_AddIcon(&sid);
- }
+ Icon_Register(hInst, MODULE, iconList, SIZEOF(iconList), MODULE);
}
void InitSound()