summaryrefslogtreecommitdiff
path: root/plugins/Variables/src
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/Variables/src
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/Variables/src')
-rw-r--r--plugins/Variables/src/variables.cpp16
1 files changed, 4 insertions, 12 deletions
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);