From c4582dd65b444e5dae29ada7cc3f6c9a9c20edf3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 2 Dec 2012 18:19:49 +0000 Subject: 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 --- protocols/FacebookRM/src/theme.cpp | 76 ++++++++------------------------------ 1 file changed, 16 insertions(+), 60 deletions(-) (limited to 'protocols/FacebookRM/src') diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 78e21a18f1..e29f5f727d 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -24,85 +24,41 @@ along with this program. If not, see . extern OBJLIST g_Instances; -struct +static IconItem icons[] = { - const char* name; - char* descr; - int defIconID; - const char* section; -} -static const icons[] = -{ - { "facebook", LPGEN("Facebook Icon"), IDI_FACEBOOK }, - { "mind", LPGEN("Mind"), IDI_MIND }, + { LPGEN("Facebook Icon"), "facebook", IDI_FACEBOOK }, + { LPGEN("Mind"), "mind", IDI_MIND }, - { "authRevoke", LPGEN("Cancel friendship"), IDI_AUTH_REVOKE }, - { "authRevokeReq", LPGEN("Cancel friendship request"), IDI_AUTH_REVOKE }, - { "authAsk", LPGEN("Request friendship"), IDI_AUTH_ASK }, - { "authGrant", LPGEN("Approve friendship"), IDI_AUTH_GRANT }, + { LPGEN("Cancel friendship"), "authRevoke", IDI_AUTH_REVOKE }, + { LPGEN("Cancel friendship request"), "authRevokeReq", IDI_AUTH_REVOKE }, + { LPGEN("Request friendship"), "authAsk", IDI_AUTH_ASK }, + { LPGEN("Approve friendship"), "authGrant", IDI_AUTH_GRANT }, - { "homepage", LPGEN("Visit Profile"), 0, "core_main_2" }, + { LPGEN("Visit Profile"), "homepage", 0 }, }; -static HANDLE hIconLibItem[SIZEOF(icons)]; - // TODO: uninit void InitIcons(void) { - TCHAR szFile[MAX_PATH]; - GetModuleFileName(g_hInstance, szFile, SIZEOF(szFile)); - - char setting_name[100]; - char section_name[100]; - - SKINICONDESC sid = { sizeof(sid) }; - sid.ptszDefaultFile = szFile; - sid.cx = sid.cy = 16; - sid.pszName = setting_name; - sid.pszSection = section_name; - sid.flags = SIDF_PATH_TCHAR; - - for (int i=0; i