diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-05-23 05:18:16 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-05-23 05:18:16 +0000 |
commit | c330fa1be257ff0d32287127647568bc01df5f73 (patch) | |
tree | 9ad41587cfd6d0c0893d707028b70d3e475787ab /plugins | |
parent | adb15a53d1b4f617f30536b8f622b3eca6060af1 (diff) |
Unknown icon added to Icolib
git-svn-id: http://svn.miranda-ng.org/main/trunk@9286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index f3358554aa..6473c8b719 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -154,11 +154,9 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) mir_snprintf(lang, SIZEOF(lang), "spell_lang_%d", i); sid.pszName = lang; - HICON hFlag; + HICON hFlag = NULL, hFlagIcoLib = NULL; if (hFlagsDll != NULL) hFlag = (HICON)LoadImage(hFlagsDll, p->language, IMAGE_ICON, 16, 16, 0); - else - hFlag = NULL; if (hFlag != NULL) { sid.hDefaultIcon = hFlag; @@ -166,9 +164,10 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) sid.iDefaultIndex = 0; } else { - sid.hDefaultIcon = NULL; - sid.ptszDefaultFile = path; - sid.iDefaultIndex = -IDI_UNKNOWN_FLAG; + hFlagIcoLib = Skin_GetIcon("spellchecker_unknown"); + sid.hDefaultIcon = hFlagIcoLib; + sid.ptszDefaultFile = NULL; + sid.iDefaultIndex = 0; } // Oki, lets add to IcoLib, then @@ -176,6 +175,8 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) if (hFlag != NULL) DestroyIcon(hFlag); + else + Skin_ReleaseIcon(hFlagIcoLib); } FreeLibrary(hFlagsDll); } @@ -234,7 +235,8 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) static IconItem iconList[] = { { LPGEN("Enabled"), "spellchecker_enabled", IDI_CHECK }, - { LPGEN("Disabled"), "spellchecker_disabled", IDI_NO_CHECK } + { LPGEN("Disabled"), "spellchecker_disabled", IDI_NO_CHECK }, + { LPGEN("Unknown"), "spellchecker_unknown", IDI_UNKNOWN_FLAG } }; extern "C" int __declspec(dllexport) Load(void) |