From aa387fa04aa096d163932d3f5f9711a2f146c6f0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 23 Feb 2013 19:43:21 +0000 Subject: - PROTO_INTERFACE::GetIcon removed and replaced with the standard implementation; - PS_LOADICON also replaced with the standard function; - ProtoConstructor() & ProtoDestructor() macroses are introduced to simplify protocols' code; - GetIcon() method implementation removed from all protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@3739 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/jabber.h | 2 -- protocols/Tlen/src/jabber_svc.cpp | 19 ++----------------- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'protocols/Tlen/src') diff --git a/protocols/Tlen/src/jabber.h b/protocols/Tlen/src/jabber.h index 450b84c1f8..caade83f3a 100644 --- a/protocols/Tlen/src/jabber.h +++ b/protocols/Tlen/src/jabber.h @@ -242,7 +242,6 @@ struct TlenProtocol : public PROTO_INTERFACE, public MZeroedObject virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename); virtual DWORD_PTR __cdecl GetCaps(int type, HANDLE hContact = NULL); - virtual HICON __cdecl GetIcon(int iconIndex); virtual int __cdecl GetInfo(HANDLE hContact, int infoType); virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id); @@ -504,4 +503,3 @@ char *TlenAdvSearchCreateQuery(HWND hwndDlg, int iqId); #endif - diff --git a/protocols/Tlen/src/jabber_svc.cpp b/protocols/Tlen/src/jabber_svc.cpp index 450446f640..b0a284c9e1 100644 --- a/protocols/Tlen/src/jabber_svc.cpp +++ b/protocols/Tlen/src/jabber_svc.cpp @@ -64,17 +64,6 @@ INT_PTR TlenGetName(void *ptr, LPARAM wParam, LPARAM lParam) return 0; } -HICON __cdecl TlenProtocol::GetIcon(int iconIndex) -{ - if ((iconIndex&0xffff) == PLI_PROTOCOL) { - HICON hIcon = GetIcolibIcon(IDI_TLEN); - HICON hIconCopy = CopyIcon(hIcon); - ReleaseIcolibIcon(hIcon); - return hIconCopy; - } - return (HICON) NULL; -} - int TlenRunSearch(TlenProtocol *proto) { int iqId = 0; if (!proto->isOnline) return 0; @@ -1286,14 +1275,11 @@ void TlenInitServicesVTbl(TlenProtocol *proto) { TlenProtocol::TlenProtocol( const char* aProtoName, const TCHAR* aUserName ) { + ProtoConstructor(this, aProtoName, aUserName); - m_iVersion = 2; - m_tszUserName = mir_tstrdup(aUserName); - m_szModuleName = mir_strdup(aProtoName); m_szProtoName = mir_strdup(aProtoName); _strlwr( m_szProtoName ); m_szProtoName[0] = toupper( m_szProtoName[0] ); - m_iStatus = ID_STATUS_OFFLINE; TlenInitServicesVTbl(this); @@ -1358,6 +1344,5 @@ TlenProtocol::~TlenProtocol() mir_free(modeMsgs.szFreechat); mir_free(modeMsgs.szInvisible); + ProtoDestructor(this); } - - -- cgit v1.2.3