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/Import/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/Import/src/main.cpp')
-rw-r--r-- | plugins/Import/src/main.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index f06d0aa2b5..3b8b6cc0b6 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -107,6 +107,10 @@ static int OnExit(WPARAM wParam, LPARAM lParam) return 0;
}
+static IconItem iconList[] = {
+ { LPGEN("Import..."), "import_main", -IDI_IMPORT }
+};
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP( &pluginInfo );
@@ -114,21 +118,11 @@ extern "C" __declspec(dllexport) int Load(void) hImportService = CreateServiceFunction(IMPORT_SERVICE, ImportCommand);
// icon
- TCHAR tszFile[MAX_PATH];
- GetModuleFileName(hInst, tszFile, MAX_PATH);
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.flags = SIDF_PATH_TCHAR;
- sid.ptszDefaultFile = tszFile;
- sid.pszSection = "Import";
- sid.pszName = "import_main";
- sid.pszDescription = LPGEN("Import...");
- sid.iDefaultIndex = -IDI_IMPORT;
- hIcoHandle = Skin_AddIcon(&sid);
+ Icon_Register(hInst, "Import", iconList, SIZEOF(iconList));
// menu item
CLISTMENUITEM mi = { sizeof(mi) };
- mi.icolibItem = hIcoHandle;
+ mi.icolibItem = iconList[0].hIcolib;
mi.pszName = LPGEN("&Import...");
mi.position = 500050000;
mi.pszService = IMPORT_SERVICE;
|