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/Variables/src/variables.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'plugins/Variables') diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 56546828ce..8bce78de58 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -550,6 +550,8 @@ int setParseOptions(struct ParseOptions *po) { return 0; } +static IconItem icon = { LPGEN("Help"), "vars_help", IDI_V }; + int LoadVarModule() { if (initTokenRegister() != 0 || initContactModule() != 0) @@ -567,21 +569,11 @@ int LoadVarModule() if (hUxTheme) pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture"); } + hShowHelpService = CreateServiceFunction(MS_VARS_SHOWHELP, showHelpService); hShowHelpExService = CreateServiceFunction(MS_VARS_SHOWHELPEX, showHelpExService); - TCHAR szFile[MAX_PATH]; - GetModuleFileName(hInst, szFile, MAX_PATH); - - SKINICONDESC sid = { sizeof(sid) }; - sid.ptszSection = TranslateT("Variables"); - sid.ptszDescription = TranslateT("Help"); - sid.pszName = "vars_help"; - sid.ptszDefaultFile = szFile; - sid.iDefaultIndex = -IDI_V; - sid.cx = sid.cy = 16; - sid.flags = SIDF_ALL_TCHAR; - Skin_AddIcon(&sid); + Icon_Register(hInst, LPGEN("Variables"), &icon, 1); hIconsChangedHook = HookEvent(ME_SKIN2_ICONSCHANGED, iconsChanged); -- cgit v1.2.3