summaryrefslogtreecommitdiff
path: root/plugins/New_GPG
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 /plugins/New_GPG
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 'plugins/New_GPG')
-rwxr-xr-xplugins/New_GPG/src/commonheaders.h1
-rwxr-xr-xplugins/New_GPG/src/icons.cpp23
2 files changed, 6 insertions, 18 deletions
diff --git a/plugins/New_GPG/src/commonheaders.h b/plugins/New_GPG/src/commonheaders.h
index 2c4d2f7a60..a3c451e2cd 100755
--- a/plugins/New_GPG/src/commonheaders.h
+++ b/plugins/New_GPG/src/commonheaders.h
@@ -76,6 +76,7 @@ using std::fstream;
#include <m_icolib.h>
#include "m_extraicons.h"
#include "m_metacontacts.h"
+#include "win2k.h"
#include "resource.h"
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp
index 890a7abbf5..4d16183422 100755
--- a/plugins/New_GPG/src/icons.cpp
+++ b/plugins/New_GPG/src/icons.cpp
@@ -18,28 +18,15 @@
extern HINSTANCE hInst;
-HANDLE IconLibDefine(char* desc, char* ident, TCHAR* def_file, int def_idx)
+static IconItem iconList[] =
{
- SKINICONDESC sid = { sizeof(sid) };
- sid.pszSection = szGPGModuleName;
- sid.pszDescription = desc;
- sid.flags = SIDF_PATH_TCHAR;
-
- sid.pszName = ident;
- sid.ptszDefaultFile = def_file;
- sid.iDefaultIndex = -def_idx;
- sid.cx = sid.cy = 16;
- return Skin_AddIcon(&sid);
-}
-
+ { "Secured", "secured", IDI_SECURED },
+ { "Unsecured", "unsecured", IDI_UNSECURED }
+};
void InitIconLib()
{
- TCHAR lib[MAX_PATH];
- GetModuleFileName(hInst, lib, MAX_PATH);
-
- IconLibDefine( "Secured", "secured", lib, IDI_SECURED);
- IconLibDefine( "Unsecured", "unsecured", lib, IDI_UNSECURED);
+ Icon_Register(hInst, szGPGModuleName, iconList, SIZEOF(iconList));
}
HICON IconLibGetIcon(const char* ident)