summaryrefslogtreecommitdiff
path: root/Protocols/IAX/IAXProto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Protocols/IAX/IAXProto.cpp')
-rw-r--r--Protocols/IAX/IAXProto.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Protocols/IAX/IAXProto.cpp b/Protocols/IAX/IAXProto.cpp
index b1f81de..e1d77bc 100644
--- a/Protocols/IAX/IAXProto.cpp
+++ b/Protocols/IAX/IAXProto.cpp
@@ -90,6 +90,14 @@ IAXProto::IAXProto(const char *aProtoName, const TCHAR *aUserName)
hCallStateEvent = CreateProtoEvent(PE_VOICE_CALL_STATE);
+ char icon[512];
+ mir_snprintf(icon, MAX_REGS(icon), "%s_main", m_szModuleName);
+
+ TCHAR section[100];
+ mir_sntprintf(section, MAX_REGS(section), _T("%s/%s"), LPGENT("Protocols"), m_tszUserName);
+
+ IcoLib_Register(icon, section, LPGENT("Protocol icon"), IDI_PROTO);
+
HookProtoEvent(ME_OPT_INITIALISE, &IAXProto::OnOptionsInit);
}
@@ -137,6 +145,20 @@ DWORD_PTR __cdecl IAXProto::GetCaps( int type, HANDLE hContact )
}
+HICON __cdecl IAXProto::GetIcon(int iconIndex)
+{
+ if (LOWORD(iconIndex) == PLI_PROTOCOL)
+ {
+ char icon[512];
+ mir_snprintf(icon, MAX_REGS(icon), "%s_main", m_szModuleName);
+
+ return IcoLib_LoadIcon(icon, TRUE);
+ }
+
+ return NULL;
+}
+
+
INT_PTR __cdecl IAXProto::SetStatus( int iNewStatus )
{
if (m_iStatus == iNewStatus)