From c4582dd65b444e5dae29ada7cc3f6c9a9c20edf3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 2 Dec 2012 18:19:49 +0000 Subject: 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 --- plugins/FavContacts/src/main.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'plugins/FavContacts/src') diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index b80c961d96..f6675982f8 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -284,6 +284,12 @@ int ProcessOptInitialise(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////// +static IconItem iconList[] = +{ + { LPGEN("Favourite Contact"), "favcontacts_favourite", IDI_FAVOURITE }, + { LPGEN("Regular Contact"), "favcontacts_regular", IDI_REGULAR }, +}; + extern "C" __declspec(dllexport) int Load(void) { if (!CoreCheck()) return 1; @@ -320,24 +326,7 @@ extern "C" __declspec(dllexport) int Load(void) ///////////////////////////////////////////////////////////////////////////////////// - TCHAR buf[MAX_PATH]; - GetModuleFileName(g_hInst, buf, SIZEOF(buf)); - - SKINICONDESC sid = { sizeof(sid) }; - sid.ptszSection = _T("Favourites"); - sid.ptszDefaultFile = buf; - sid.cx = sid.cy = 16; - sid.flags = SIDF_ALL_TCHAR; - - sid.pszName = "favcontacts_favourite"; - sid.ptszDescription = _T("Favourite Contact"); - sid.iDefaultIndex = -IDI_FAVOURITE; - g_icoFavourite = Skin_AddIcon(&sid); - - sid.pszName = "favcontacts_regular"; - sid.ptszDescription = _T("Regular Contact"); - sid.iDefaultIndex = -IDI_REGULAR; - g_icoRegular = Skin_AddIcon(&sid); + Icon_Register(g_hInst, LPGEN("Favourites"), iconList, SIZEOF(iconList)); LoadHttpApi(); -- cgit v1.2.3