summaryrefslogtreecommitdiff
path: root/plugins/MetaContacts
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MetaContacts')
-rw-r--r--plugins/MetaContacts/src/icons.cpp38
1 files changed, 9 insertions, 29 deletions
diff --git a/plugins/MetaContacts/src/icons.cpp b/plugins/MetaContacts/src/icons.cpp
index 3776212289..508fe50425 100644
--- a/plugins/MetaContacts/src/icons.cpp
+++ b/plugins/MetaContacts/src/icons.cpp
@@ -1,20 +1,13 @@
#include "metacontacts.h"
-struct
-{
- char* szDescr;
- char* szName;
- int defIconID;
- HANDLE hIcolib;
-}
-static iconList[] = {
- { LPGEN("Toggle Off"), "mc_off", IDI_MCMENUOFF },
- { LPGEN("Toggle On"), "mc_on", IDI_MCMENU },
- { LPGEN("Convert to MetaContact"), "mc_convert", IDI_MCCONVERT },
- { LPGEN("Add to Existing"), "mc_add", IDI_MCADD },
- { LPGEN("Edit"), "mc_edit", IDI_MCEDIT },
- { LPGEN("Set to Default"), "mc_default", IDI_MCSETDEFAULT },
- { LPGEN("Remove"), "mc_remove", IDI_MCREMOVE },
+static IconItem iconList[] = {
+ { LPGEN("Toggle Off"), "off", IDI_MCMENUOFF },
+ { LPGEN("Toggle On"), "on", IDI_MCMENU },
+ { LPGEN("Convert to MetaContact"), "convert", IDI_MCCONVERT },
+ { LPGEN("Add to Existing"), "add", IDI_MCADD },
+ { LPGEN("Edit"), "edit", IDI_MCEDIT },
+ { LPGEN("Set to Default"), "default", IDI_MCSETDEFAULT },
+ { LPGEN("Remove"), "remove", IDI_MCREMOVE },
};
HANDLE GetIconHandle(IconIndex i)
@@ -29,18 +22,5 @@ HICON LoadIconEx(IconIndex i)
void InitIcons(void)
{
- TCHAR path[MAX_PATH];
- GetModuleFileName(hInstance, path, SIZEOF(path));
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.flags = SIDF_PATH_TCHAR;
- sid.pszSection = META_PROTO;
- sid.ptszDefaultFile = path;
-
- for (int i=0; i < SIZEOF(iconList); ++i) {
- sid.pszDescription = iconList[i].szDescr;
- sid.pszName = iconList[i].szName;
- sid.iDefaultIndex = -iconList[i].defIconID;
- iconList[i].hIcolib = Skin_AddIcon(&sid);
- }
+ Icon_Register(hInstance, META_PROTO, iconList, SIZEOF(iconList), "mc");
}