From 57abc51aad272a656282a52a460a47abe24e07d6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2012 23:51:53 +0000 Subject: - MS_SKIN2_ADDICON replaced with Skin_AddIcon; - SKINICONDESC_SIZE* constants removed and replaced with sizeof(sid); - added SIDF_PATH_UNICODE for all plugins; - dynamic translation fixed in the icolib options dialog git-svn-id: http://svn.miranda-ng.org/main/trunk@507 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Gender/main.cpp | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'plugins/Gender/main.cpp') diff --git a/plugins/Gender/main.cpp b/plugins/Gender/main.cpp index a95d5593c9..3df2a909e8 100644 --- a/plugins/Gender/main.cpp +++ b/plugins/Gender/main.cpp @@ -265,33 +265,30 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam) bMetaAvail = (ServiceExists(MS_MC_GETMETACONTACT) != 0); //IcoLib support - if(ServiceExists(MS_SKIN2_ADDICON)) - { - SKINICONDESC sid = {0}; - sid.cbSize = SKINICONDESC_SIZE; - sid.flags = SIDF_ALL_TCHAR; - sid.ptszSection = LPGENT("Gender"); - TCHAR szFile[MAX_PATH]; - GetModuleFileName(g_hInst, szFile, MAX_PATH); - sid.ptszDefaultFile = szFile; + SKINICONDESC sid = {0}; + sid.cbSize = sizeof(sid); + sid.flags = SIDF_ALL_TCHAR; + sid.ptszSection = LPGENT("Gender"); + TCHAR szFile[MAX_PATH]; + GetModuleFileName(g_hInst, szFile, MAX_PATH); + sid.ptszDefaultFile = szFile; - sid.ptszDescription = LPGENT("Male"); - sid.pszName = "male_icon"; - sid.iDefaultIndex = -IDI_MALE; - g_hIconMale = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); + sid.ptszDescription = LPGENT("Male"); + sid.pszName = "male_icon"; + sid.iDefaultIndex = -IDI_MALE; + g_hIconMale = Skin_AddIcon(&sid); - sid.ptszDescription = LPGENT("Female"); - sid.pszName = "female_icon"; - sid.iDefaultIndex = -IDI_FEMALE; - g_hIconFemale = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); + sid.ptszDescription = LPGENT("Female"); + sid.pszName = "female_icon"; + sid.iDefaultIndex = -IDI_FEMALE; + g_hIconFemale = Skin_AddIcon(&sid); - sid.ptszDescription = LPGENT("No info"); - sid.pszName = "menu_icon"; - sid.iDefaultIndex = -IDI_UNDEF; - g_hIconMenu = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); + sid.ptszDescription = LPGENT("No info"); + sid.pszName = "menu_icon"; + sid.iDefaultIndex = -IDI_UNDEF; + g_hIconMenu = Skin_AddIcon(&sid); - hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, onExtraImageListRebuild); - } + hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, onExtraImageListRebuild); g_hExtraIcon = ExtraIcon_Register("gender", "Gender", "menu_icon"); if (g_hExtraIcon != NULL) -- cgit v1.2.3