diff options
author | George Hazan <george.hazan@gmail.com> | 2013-02-23 19:43:21 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-02-23 19:43:21 +0000 |
commit | aa387fa04aa096d163932d3f5f9711a2f146c6f0 (patch) | |
tree | 7efe5dabf5bf5b9a78f8f991522487814bfc8cb0 /protocols/Yahoo | |
parent | 139c2c1a61d9f765704a2001199c2712d6587fb4 (diff) |
- 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
Diffstat (limited to 'protocols/Yahoo')
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 38 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.h | 1 |
2 files changed, 6 insertions, 33 deletions
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 05d6484548..d78943f4b7 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -28,15 +28,12 @@ #endif
CYahooProto::CYahooProto( const char* aProtoName, const TCHAR* aUserName ) :
- m_bLoggedIn( FALSE ),
+ m_bLoggedIn( FALSE ),
poll_loop( 0),
- m_chatrooms(3, ChatRoom::compare)
+ m_chatrooms(3, ChatRoom::compare)
{
- m_iVersion = 2;
- m_tszUserName = mir_tstrdup( aUserName );
- m_szModuleName = mir_strdup( aProtoName );
+ ProtoConstructor(this, aProtoName, aUserName);
- m_startStatus = ID_STATUS_ONLINE;
m_connections = NULL;
m_connection_tags = 0;
@@ -59,15 +56,15 @@ CYahooProto::~CYahooProto() DestroyHookableEvent(hYahooNudge);
MenuUninit();
-
+
m_chatrooms.destroy();
- mir_free( m_szModuleName );
- mir_free( m_tszUserName );
FREE(m_startMsg);
FREE(m_pw_token);
Netlib_CloseHandle( m_hNetlibUser );
+
+ ProtoDestructor(this);
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -347,29 +344,6 @@ DWORD_PTR __cdecl CYahooProto::GetCaps( int type, HANDLE /*hContact*/ ) }
////////////////////////////////////////////////////////////////////////////////////////
-// GetIcon - loads an icon for the contact list
-
-HICON __cdecl CYahooProto::GetIcon( int iconIndex )
-{
- if (LOWORD(iconIndex) == PLI_PROTOCOL)
- {
- if (iconIndex & PLIF_ICOLIBHANDLE)
- return (HICON)GetIconHandle(IDI_YAHOO);
-
- bool big = (iconIndex & PLIF_SMALL) == 0;
- HICON hIcon = LoadIconEx("yahoo", big);
-
- if (iconIndex & PLIF_ICOLIB)
- return hIcon;
-
- hIcon = CopyIcon(hIcon);
- ReleaseIconEx("yahoo", big);
- return hIcon;
- }
- return NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
void __cdecl CYahooProto::get_info_thread(HANDLE hContact)
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index 7c6150f1aa..9d70cbd9d5 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -58,7 +58,6 @@ struct CYahooProto : 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 );
|