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/AuthState/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/AuthState/src/main.cpp')
-rw-r--r-- | plugins/AuthState/src/main.cpp | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index cf2e215e72..e6b6f4496e 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -169,31 +169,17 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) return 0;
}
+static IconItem iconList[] =
+{
+ { LPGEN("Auth"), "auth_icon", IDI_AUTH },
+ { LPGEN("Grant"), "grant_icon", IDI_GRANT },
+ { LPGEN("Auth & Grant"), "authgrant_icon", IDI_AUTHGRANT }
+};
+
int onModulesLoaded(WPARAM wParam,LPARAM lParam)
{
// IcoLib support
- TCHAR szFile[MAX_PATH];
- GetModuleFileName(g_hInst, szFile, MAX_PATH);
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.flags = SIDF_PATH_TCHAR;
- sid.ptszDefaultFile = szFile;
- sid.pszSection = "Auth State";
-
- sid.pszDescription = LPGEN("Auth");
- sid.pszName = "auth_icon";
- sid.iDefaultIndex = -IDI_AUTH;
- Skin_AddIcon(&sid);
-
- sid.pszDescription = LPGEN("Grant");
- sid.pszName = "grant_icon";
- sid.iDefaultIndex = -IDI_GRANT;
- Skin_AddIcon(&sid);
-
- sid.pszDescription = LPGEN("Auth & Grant");
- sid.pszName = "authgrant_icon";
- sid.iDefaultIndex = -IDI_AUTHGRANT;
- Skin_AddIcon(&sid);
+ Icon_Register(g_hInst, "Auth State", iconList, SIZEOF(iconList));
// extra icons
hExtraIcon = ExtraIcon_Register("authstate", "Auth State", "authgrant_icon");
|