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/SecureIM/loadicons.cpp | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'plugins/SecureIM') diff --git a/plugins/SecureIM/loadicons.cpp b/plugins/SecureIM/loadicons.cpp index ec6d0ae17e..3303424626 100644 --- a/plugins/SecureIM/loadicons.cpp +++ b/plugins/SecureIM/loadicons.cpp @@ -65,27 +65,21 @@ void InitIcons(void) g_hIconInst = hNewIconInst; - SKINICONDESC sid; - memset(&sid,0,sizeof(sid)); - - sid.cbSize = sizeof(SKINICONDESC); + SKINICONDESC sid = { 0 }; + sid.cbSize = sizeof(sid); sid.pszSection = "SecureIM"; HICON hIcon; for (int i=0; icons[i].key; i++) { - if(ServiceExists(MS_SKIN2_ADDICON)) { - sid.pszSection = icons[i].section; - sid.pszName = icons[i].name; - sid.pszDescription = icons[i].text; - sid.pszDefaultFile = "secureim_icons.dll"; - sid.iDefaultIndex = icons[i].key; - sid.hDefaultIcon = (HICON)LoadImage(g_hIconInst, MAKEINTRESOURCE(icons[i].key), IMAGE_ICON, 16, 16, LR_SHARED); - CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); - hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)icons[i].name); - } - else { - hIcon = (HICON)LoadImage(g_hIconInst, MAKEINTRESOURCE(icons[i].key), IMAGE_ICON, 16, 16, LR_SHARED); - } + sid.pszSection = icons[i].section; + sid.pszName = icons[i].name; + sid.pszDescription = icons[i].text; + sid.pszDefaultFile = "secureim_icons.dll"; + sid.iDefaultIndex = icons[i].key; + sid.hDefaultIcon = (HICON)LoadImage(g_hIconInst, MAKEINTRESOURCE(icons[i].key), IMAGE_ICON, 16, 16, LR_SHARED); + Skin_AddIcon(&sid); + hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)icons[i].name); + if(icons[i].tbl == TBL_IEC) g_hIEC[icons[i].idx]=hIcon; else @@ -96,9 +90,7 @@ void InitIcons(void) g_hPOP[icons[i].idx]=hIcon; } - if(ServiceExists(MS_SKIN2_ADDICON)) { - AddHookFunction(ME_SKIN2_ICONSCHANGED, ReloadIcons); - } + AddHookFunction(ME_SKIN2_ICONSCHANGED, ReloadIcons); } // EOF -- cgit v1.2.3