summaryrefslogtreecommitdiff
path: root/protocols/Yahoo
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 /protocols/Yahoo
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 'protocols/Yahoo')
-rw-r--r--protocols/Yahoo/src/icolib.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/protocols/Yahoo/src/icolib.cpp b/protocols/Yahoo/src/icolib.cpp
index 40ca82da25..eace62ab11 100644
--- a/protocols/Yahoo/src/icolib.cpp
+++ b/protocols/Yahoo/src/icolib.cpp
@@ -17,13 +17,8 @@
#include "resource.h"
-struct
+static IconItem iconList[] =
{
- const char* szDescr;
- const char* szName;
- int defIconID;
-}
-static iconList[] = {
{ LPGEN("Main"), "yahoo", IDI_YAHOO },
{ LPGEN("Mail"), "mail", IDI_INBOX },
{ LPGEN("Profile"), "profile", IDI_PROFILE },
@@ -37,26 +32,7 @@ HANDLE hIconLibItem[SIZEOF(iconList)];
void CYahooProto::IconsInit( void )
{
- TCHAR szFile[MAX_PATH];
- GetModuleFileName(hInstance, szFile, SIZEOF(szFile));
-
- char szSectionName[100];
- mir_snprintf(szSectionName, sizeof(szSectionName), "%s/%s", LPGEN("Protocols"), LPGEN("YAHOO"));
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.ptszDefaultFile = szFile;
- sid.pszSection = szSectionName;
- sid.flags = SIDF_PATH_TCHAR;
-
- for ( int i = 0; i < SIZEOF(iconList); i++ ) {
- char szSettingName[100];
- mir_snprintf( szSettingName, sizeof( szSettingName ), "YAHOO_%s", iconList[i].szName );
-
- sid.pszName = szSettingName;
- sid.pszDescription = (char* )iconList[i].szDescr;
- sid.iDefaultIndex = -iconList[i].defIconID;
- hIconLibItem[i] = Skin_AddIcon(&sid);
- }
+ Icon_Register(hInstance, "Protocols/YAHOO", iconList, SIZEOF(iconList), "YAHOO");
}
HICON CYahooProto::LoadIconEx( const char* name, bool big )