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/Twitter/src/theme.cpp | 65 ++++++----------------------------------- 1 file changed, 9 insertions(+), 56 deletions(-) (limited to 'protocols/Twitter/src') diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 3014c4523b..cb9dd71e9d 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -20,20 +20,13 @@ along with this program. If not, see . extern OBJLIST g_Instances; -struct +static IconItem icons[] = { - const char* name; - const char* descr; - int defIconID; - const char* section; -} -static const icons[] = -{ - { "twitter", "Twitter Icon", IDI_TWITTER }, - { "tweet", "Tweet", IDI_TWITTER }, - { "reply", "Reply to Tweet", IDI_TWITTER }, + { LPGEN("Twitter Icon"), "twitter", IDI_TWITTER }, + { LPGEN("Tweet"), "tweet", IDI_TWITTER }, + { LPGEN("Reply to Tweet"), "reply", IDI_TWITTER }, - { "homepage", "Visit Homepage", 0, "core_main_2" }, + { LPGEN("Visit Homepage"), "homepage", 0 }, }; static HANDLE hIconLibItem[SIZEOF(icons)]; @@ -41,59 +34,19 @@ 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