diff options
author | George Hazan <george.hazan@gmail.com> | 2016-02-25 13:36:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-02-25 13:36:37 +0000 |
commit | 42095fb5cb7228f9dfb94965988029fd7f47b793 (patch) | |
tree | 6185ec5d7450fb474ed80b0ce95d0d1c0e0b26a8 /plugins/Quotes/src/IconLib.cpp | |
parent | 8e891173c74ceaa0964f32be247f380fd5f8bcd1 (diff) |
Quotes: major code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16335 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src/IconLib.cpp')
-rw-r--r-- | plugins/Quotes/src/IconLib.cpp | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/plugins/Quotes/src/IconLib.cpp b/plugins/Quotes/src/IconLib.cpp index 70f88882cb..d2ea08eee0 100644 --- a/plugins/Quotes/src/IconLib.cpp +++ b/plugins/Quotes/src/IconLib.cpp @@ -2,18 +2,18 @@ static IconItem iconList[] =
{
- { LPGEN("Protocol icon"), ICON_STR_MAIN, IDI_ICON_MAIN },
- { LPGEN("Auto Update Disabled"), ICON_STR_AUTO_UPDATE_DISABLED, IDI_ICON_DISABLED },
- { LPGEN("Quote/Rate up"), ICON_STR_QUOTE_UP, IDI_ICON_UP },
- { LPGEN("Quote/Rate down"), ICON_STR_QUOTE_DOWN, IDI_ICON_DOWN },
- { LPGEN("Quote/Rate not changed"), ICON_STR_QUOTE_NOT_CHANGED, IDI_ICON_NOTCHANGED },
- { LPGEN("Quote Section"), ICON_STR_SECTION, IDI_ICON_SECTION },
- { LPGEN("Quote"), ICON_STR_QUOTE, IDI_ICON_QUOTE },
- { LPGEN("Currency Converter"), ICON_STR_CURRENCY_CONVERTER, IDI_ICON_CURRENCY_CONVERTER },
- { LPGEN("Refresh"), ICON_STR_REFRESH, IDI_ICON_REFRESH },
- { LPGEN("Export"), ICON_STR_EXPORT, IDI_ICON_EXPORT },
- { LPGEN("Swap button"), ICON_STR_SWAP, IDI_ICON_SWAP },
- { LPGEN("Import"), ICON_STR_IMPORT, IDI_ICON_IMPORT }
+ { LPGEN("Protocol icon"), ICON_STR_MAIN, IDI_ICON_MAIN },
+ { LPGEN("Auto Update Disabled"), "auto_update_disabled", IDI_ICON_DISABLED },
+ { LPGEN("Quote/Rate up"), "quote_up", IDI_ICON_UP },
+ { LPGEN("Quote/Rate down"), "quote_down", IDI_ICON_DOWN },
+ { LPGEN("Quote/Rate not changed"), "quote_not_changed", IDI_ICON_NOTCHANGED },
+ { LPGEN("Quote Section"), "quote_section", IDI_ICON_SECTION },
+ { LPGEN("Quote"), ICON_STR_QUOTE, IDI_ICON_QUOTE },
+ { LPGEN("Currency Converter"), "currency_converter", IDI_ICON_CURRENCY_CONVERTER },
+ { LPGEN("Refresh"), "refresh", IDI_ICON_REFRESH },
+ { LPGEN("Export"), "export", IDI_ICON_EXPORT },
+ { LPGEN("Swap button"), "swap", IDI_ICON_SWAP },
+ { LPGEN("Import"), "import", IDI_ICON_IMPORT }
};
void Quotes_IconsInit()
@@ -21,19 +21,13 @@ void Quotes_IconsInit() ::Icon_Register(g_hInstance, QUOTES_PROTOCOL_NAME, iconList, _countof(iconList), QUOTES_PROTOCOL_NAME);
}
-std::string Quotes_MakeIconName(const char* name)
+HICON Quotes_LoadIconEx(int iconId, bool bBig /*= false*/)
{
- assert(name);
- std::string sName(QUOTES_PROTOCOL_NAME);
- sName += "_";
- sName += name;
- return sName;
-}
+ for (int i = 0; i < _countof(iconList); i++)
+ if (iconList[i].defIconID == iconId)
+ return IcoLib_GetIconByHandle(iconList[i].hIcolib, bBig);
-HICON Quotes_LoadIconEx(const char* name, bool bBig /*= false*/)
-{
- std::string sIconName = Quotes_MakeIconName(name);
- return IcoLib_GetIcon(sIconName.c_str(), bBig);
+ return NULL;
}
HANDLE Quotes_GetIconHandle(int iconId)
|