From 854959cbc0a1bad2c086214be4d1a829b17a61f3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 1 Dec 2012 13:25:11 +0000 Subject: icolib: icon creation quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@2588 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_icolib.cpp | 8 +++----- protocols/MRA/res/resource.rc | 1 + protocols/MRA/src/MraIcons.cpp | 30 ++++++++++++------------------ protocols/MRA/src/resource.h | 1 + 4 files changed, 17 insertions(+), 23 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 2df794d300..3abf457b1b 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -347,7 +347,6 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa { char szPath[MAX_PATH],szMyPath[MAX_PATH], szFullPath[MAX_PATH],*str; BOOL has_proto_icon=FALSE; - SKINICONDESC sid={0}; if (needFree) *needFree=FALSE; GetModuleFileNameA(NULL, szPath, MAX_PATH); str=strrchr(szPath,'\\'); @@ -359,8 +358,8 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa if (hi) has_proto_icon=TRUE; if (hi && nf) DestroyIcon(hi); if (IconName != NULL && SectName != NULL) { - sid.cbSize = sizeof(sid); - sid.hDefaultIcon = (has_proto_icon)?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,0,(LPARAM)(-internalidx)); + SKINICONDESC sid = { sizeof(sid) }; + sid.hDefaultIcon = (has_proto_icon) ? NULL : LoadSkinnedProtoIcon(0, -internalidx); sid.ptszSection = SectName; sid.pszName = IconName; sid.ptszDescription = Description; @@ -384,7 +383,6 @@ static HICON LoadSmallIcon(HINSTANCE hInstance, LPCTSTR lpIconName) int CJabberProto::LoadAdvancedIcons(int iID) { - int i; char *proto = TransportProtoTable[iID].proto; char defFile[MAX_PATH] = {0}; TCHAR Group[255]; @@ -398,7 +396,7 @@ int CJabberProto::LoadAdvancedIcons(int iID) hAdvancedStatusIcon=(HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST,0,0); EnterCriticalSection(&m_csModeMsgMutex); - for (i=0; i