summaryrefslogtreecommitdiff
path: root/plugins/Quotes/src/IconLib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Quotes/src/IconLib.cpp')
-rw-r--r--plugins/Quotes/src/IconLib.cpp40
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)