diff options
author | George Hazan <george.hazan@gmail.com> | 2012-12-02 18:19:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-12-02 18:19:49 +0000 |
commit | c4582dd65b444e5dae29ada7cc3f6c9a9c20edf3 (patch) | |
tree | 17a8627550b202d62df8e1df76d2585d3d0cdeaa /plugins/FavContacts/src/main.cpp | |
parent | 5ea5feb7e052ca45af7bc9ed76e4a252bd71950d (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/FavContacts/src/main.cpp')
-rw-r--r-- | plugins/FavContacts/src/main.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index b80c961d96..f6675982f8 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -284,6 +284,12 @@ int ProcessOptInitialise(WPARAM wParam, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////
+static IconItem iconList[] =
+{
+ { LPGEN("Favourite Contact"), "favcontacts_favourite", IDI_FAVOURITE },
+ { LPGEN("Regular Contact"), "favcontacts_regular", IDI_REGULAR },
+};
+
extern "C" __declspec(dllexport) int Load(void)
{
if (!CoreCheck()) return 1;
@@ -320,24 +326,7 @@ extern "C" __declspec(dllexport) int Load(void) /////////////////////////////////////////////////////////////////////////////////////
- TCHAR buf[MAX_PATH];
- GetModuleFileName(g_hInst, buf, SIZEOF(buf));
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.ptszSection = _T("Favourites");
- sid.ptszDefaultFile = buf;
- sid.cx = sid.cy = 16;
- sid.flags = SIDF_ALL_TCHAR;
-
- sid.pszName = "favcontacts_favourite";
- sid.ptszDescription = _T("Favourite Contact");
- sid.iDefaultIndex = -IDI_FAVOURITE;
- g_icoFavourite = Skin_AddIcon(&sid);
-
- sid.pszName = "favcontacts_regular";
- sid.ptszDescription = _T("Regular Contact");
- sid.iDefaultIndex = -IDI_REGULAR;
- g_icoRegular = Skin_AddIcon(&sid);
+ Icon_Register(g_hInst, LPGEN("Favourites"), iconList, SIZEOF(iconList));
LoadHttpApi();
|