summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-12-02 18:19:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-12-02 18:19:49 +0000
commitc4582dd65b444e5dae29ada7cc3f6c9a9c20edf3 (patch)
tree17a8627550b202d62df8e1df76d2585d3d0cdeaa /plugins/NewXstatusNotify/src/main.cpp
parent5ea5feb7e052ca45af7bc9ed76e4a252bd71950d (diff)
new easy standard way of registering icons: Icon_Register
git-svn-id: http://svn.miranda-ng.org/main/trunk@2601 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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()