diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-27 13:58:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-27 13:58:20 +0000 |
commit | fb8d04451e6808b1c88116c7d6d6c473831c5a2b (patch) | |
tree | a4bcf1b78b38191285231506ce4df4dda3bde09c /protocols/IcqOscarJ/src/icq_proto.cpp | |
parent | c70038e7aab4b82a4411284073b0cf6adca17db2 (diff) |
strange icolib manager in ICQ killed and replaced with the standard icolib calls. rip...
git-svn-id: http://svn.miranda-ng.org/main/trunk@3304 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_proto.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 50771cb011..2b8293ef0a 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -164,17 +164,10 @@ cheekySearchId( -1 ) // Custom caps
CreateProtoService(PS_ICQ_ADDCAPABILITY, &CIcqProto::IcqAddCapability);
CreateProtoService(PS_ICQ_CHECKCAPABILITY, &CIcqProto::IcqCheckCapability);
- {
- // Initialize IconLib icons
- char szSectionName[MAX_PATH], *szAccountName = tchar_to_utf8(m_tszUserName);
- null_snprintf(szSectionName, sizeof(szSectionName), "Protocols/%s/Accounts", ICQ_PROTOCOL_NAME);
-
- TCHAR lib[MAX_PATH];
- GetModuleFileName(hInst, lib, MAX_PATH);
- m_hIconProtocol = IconLibDefine(szAccountName, szSectionName, m_szModuleName, "main", lib, -IDI_ICQ);
- SAFE_FREE(&szAccountName);
- }
+ IconItemT protoIcon = { m_tszUserName, "main", IDI_ICQ };
+ Icon_RegisterT(hInst, _T("Protocols/ICQ/Accounts"), &protoIcon, 1, m_szModuleName);
+ m_hIconProtocol = protoIcon.hIcolib;
// Reset a bunch of session specific settings
UpdateGlobalSettings();
@@ -281,7 +274,7 @@ CIcqProto::~CIcqProto() SAFE_FREE(&m_modeMsgs.szFfc);
// Remove account icons
- IconLibRemove(&m_hIconProtocol);
+ Skin_RemoveIconHandle(m_hIconProtocol);
NetLog_Server("%s: Protocol instance '%s' destroyed.", ICQ_PROTOCOL_NAME, m_szModuleName);
@@ -804,18 +797,17 @@ HICON __cdecl CIcqProto::GetIcon( int iconIndex ) if (LOWORD(iconIndex) == PLI_PROTOCOL)
{
if (iconIndex & PLIF_ICOLIBHANDLE)
- return (HICON)m_hIconProtocol->Handle();
+ return (HICON)m_hIconProtocol;
bool big = (iconIndex & PLIF_SMALL) == 0;
- HICON hIcon = m_hIconProtocol->GetIcon(big);
+ HICON hIcon = Skin_GetIconByHandle(m_hIconProtocol, big);
if (iconIndex & PLIF_ICOLIB)
return hIcon;
- hIcon = CopyIcon(hIcon);
- m_hIconProtocol->ReleaseIcon(big);
- return hIcon;
-
+ HICON hIconNew = CopyIcon(hIcon);
+ Skin_ReleaseIcon(hIcon);
+ return hIconNew;
}
return NULL;
}
|