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/Nudge/main.cpp | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'plugins/Nudge') diff --git a/plugins/Nudge/main.cpp b/plugins/Nudge/main.cpp index 5648e052a5..cf5538c2a1 100644 --- a/plugins/Nudge/main.cpp +++ b/plugins/Nudge/main.cpp @@ -390,23 +390,20 @@ void RegisterToDbeditorpp(void) void LoadIcons(void) { //Load icons - if(ServiceExists(MS_SKIN2_ADDICON)) - { - SKINICONDESC sid = {0}; - TCHAR szFilename[MAX_PATH]; - GetModuleFileName(hInst,szFilename,MAX_PATH); - - sid.cbSize = SKINICONDESC_SIZE; - sid.flags = SIDF_ALL_TCHAR; - sid.ptszSection = LPGENT("Nudge"); - sid.ptszDefaultFile = szFilename; - - sid.pszName = "Nudge_Default"; - sid.ptszDescription = LPGENT("Nudge as Default"); - sid.iDefaultIndex = -IDI_NUDGE; - sid.hDefaultIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NUDGE)); - g_hIcon = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); - } + SKINICONDESC sid = {0}; + TCHAR szFilename[MAX_PATH]; + GetModuleFileName(hInst,szFilename,MAX_PATH); + + sid.cbSize = sizeof(sid); + sid.flags = SIDF_ALL_TCHAR; + sid.ptszSection = LPGENT("Nudge"); + sid.ptszDefaultFile = szFilename; + + sid.pszName = "Nudge_Default"; + sid.ptszDescription = LPGENT("Nudge as Default"); + sid.iDefaultIndex = -IDI_NUDGE; + sid.hDefaultIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NUDGE)); + g_hIcon = Skin_AddIcon(&sid); } // Nudge support @@ -791,7 +788,7 @@ void Nudge_AddAccount(PROTOACCOUNT *proto) mir_sntprintf(iconDesc, SIZEOF(iconDesc), TranslateT("Nudge for %s"), proto->tszAccountName); SKINICONDESC sid = {0}; - sid.cbSize = SKINICONDESC_SIZE; + sid.cbSize = sizeof(sid); sid.flags = SIDF_ALL_TCHAR; sid.ptszSection = LPGENT("Nudge"); sid.ptszDefaultFile = szFilename; @@ -799,7 +796,7 @@ void Nudge_AddAccount(PROTOACCOUNT *proto) sid.ptszDescription = iconDesc; sid.iDefaultIndex = -IDI_NUDGE; sid.hDefaultIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NUDGE)); - newNudge->item.hIcoLibItem = (HANDLE) CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); + newNudge->item.hIcoLibItem = Skin_AddIcon(&sid); //Add contact menu entry CLISTMENUITEM mi = {0}; -- cgit v1.2.3