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/New_GPG/src/icons.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'plugins/New_GPG/src/icons.cpp') diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp index 890a7abbf5..4d16183422 100755 --- a/plugins/New_GPG/src/icons.cpp +++ b/plugins/New_GPG/src/icons.cpp @@ -18,28 +18,15 @@ extern HINSTANCE hInst; -HANDLE IconLibDefine(char* desc, char* ident, TCHAR* def_file, int def_idx) +static IconItem iconList[] = { - SKINICONDESC sid = { sizeof(sid) }; - sid.pszSection = szGPGModuleName; - sid.pszDescription = desc; - sid.flags = SIDF_PATH_TCHAR; - - sid.pszName = ident; - sid.ptszDefaultFile = def_file; - sid.iDefaultIndex = -def_idx; - sid.cx = sid.cy = 16; - return Skin_AddIcon(&sid); -} - + { "Secured", "secured", IDI_SECURED }, + { "Unsecured", "unsecured", IDI_UNSECURED } +}; void InitIconLib() { - TCHAR lib[MAX_PATH]; - GetModuleFileName(hInst, lib, MAX_PATH); - - IconLibDefine( "Secured", "secured", lib, IDI_SECURED); - IconLibDefine( "Unsecured", "unsecured", lib, IDI_UNSECURED); + Icon_Register(hInst, szGPGModuleName, iconList, SIZEOF(iconList)); } HICON IconLibGetIcon(const char* ident) -- cgit v1.2.3