summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker/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/SpellChecker/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/SpellChecker/src')
-rw-r--r--plugins/SpellChecker/src/spellchecker.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp
index 6fb39c5831..f06de84fad 100644
--- a/plugins/SpellChecker/src/spellchecker.cpp
+++ b/plugins/SpellChecker/src/spellchecker.cpp
@@ -259,14 +259,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam)
////////////////////////////////////////////////////////////////////////////////////////
-struct
-{
- char* szDescr;
- char* szName;
- int defIconID;
- HANDLE hIcolib;
-}
-static iconList[] =
+static IconItem iconList[] =
{
{ LPGEN("Enabled"), "spellchecker_enabled", IDI_CHECK },
{ LPGEN("Disabled"), "spellchecker_disabled", IDI_NO_CHECK }
@@ -277,20 +270,7 @@ extern "C" int __declspec(dllexport) Load(void)
mir_getLP(&pluginInfo);
// icons
- TCHAR path[MAX_PATH];
- GetModuleFileName(hInst, path, MAX_PATH);
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.flags = SIDF_PATH_TCHAR;
- sid.pszSection = LPGEN("Spell Checker");
- 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(hInst, LPGEN("Spell Checker"), iconList, SIZEOF(iconList));
// hooks
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);