summaryrefslogtreecommitdiff
path: root/plugins/PackUpdater
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/PackUpdater
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/PackUpdater')
-rw-r--r--plugins/PackUpdater/Src/Common.h7
-rw-r--r--plugins/PackUpdater/Src/Utils.cpp26
2 files changed, 6 insertions, 27 deletions
diff --git a/plugins/PackUpdater/Src/Common.h b/plugins/PackUpdater/Src/Common.h
index 1e2f507688..8f8a25aa8a 100644
--- a/plugins/PackUpdater/Src/Common.h
+++ b/plugins/PackUpdater/Src/Common.h
@@ -78,13 +78,6 @@ struct FILEINFO
BYTE Force;
};
-struct PackUpdaterIconList
-{
- char* szIconName;
- TCHAR* tszDescr;
- int IconID;
-};
-
#define DEFAULT_REMINDER 1
#define DEFAULT_UPDATEONSTARTUP 1
#define DEFAULT_ONLYONCEADAY 0
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp
index 4a46f46c90..150552b18d 100644
--- a/plugins/PackUpdater/Src/Utils.cpp
+++ b/plugins/PackUpdater/Src/Utils.cpp
@@ -33,31 +33,17 @@ MYOPTIONS MyOptions = {0};
aPopups PopupsList[POPUPS];
LPCTSTR Title = {0}, Text = {0};
-PackUpdaterIconList iconList[] =
+IconItem iconList[] =
{
- { "check_update", _T("Check for pack updates"), IDI_MENU },
- { "empty_folder", _T("Clear pack updates folder"), IDI_DELETE },
- { "btn_ok", _T("'Yes' Button"), IDI_OK },
- { "btn_cancel", _T("'No' Button"), IDI_CANCEL }
+ { LPGEN("Check for pack updates"), "check_update", IDI_MENU },
+ { LPGEN("Clear pack updates folder"), "empty_folder", IDI_DELETE },
+ { LPGEN("'Yes' Button"), "btn_ok", IDI_OK },
+ { LPGEN("'No' Button"), "btn_cancel", IDI_CANCEL }
};
VOID IcoLibInit()
{
- TCHAR destfile[MAX_PATH];
- GetModuleFileName(hInst, destfile, MAX_PATH);
-
- SKINICONDESC sid = { sizeof(sid) };
- sid.flags = SIDF_ALL_TCHAR;
- sid.cx = sid.cy = 16;
- sid.ptszDefaultFile = destfile;
- sid.ptszSection = MODULE;
-
- for (int i = 0; i < SIZEOF(iconList); i++) {
- sid.pszName = iconList[i].szIconName;
- sid.ptszDescription = iconList[i].tszDescr;
- sid.iDefaultIndex = -iconList[i].IconID;
- Skin_AddIcon(&sid);
- }
+ Icon_Register(hInst, MODULEA, iconList, SIZEOF(iconList));
}
BOOL NetlibInit()