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/Twitter/src/proto.cpp | 19 ++++--------------- protocols/Twitter/src/proto.h | 1 - 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'protocols/Twitter/src') diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 9437d01fce..6f143ba501 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -125,17 +125,6 @@ DWORD_PTR TwitterProto::GetCaps(int type,HANDLE hContact) return 0; } -HICON TwitterProto::GetIcon(int index) -{ - if(LOWORD(index) == PLI_PROTOCOL) - { - HICON ico = Skin_GetIcon("Twitter_twitter"); - return CopyIcon(ico); - } - else - return 0; -} - // ************************* int TwitterProto::RecvMsg(HANDLE hContact,PROTORECVEVENT *pre) @@ -179,7 +168,7 @@ int TwitterProto::SendMsg(HANDLE hContact,int flags,const char *msg) return 0; TCHAR* tszMsg; - if ( flags & PREF_UTF ) + if ( flags & PREF_UTF ) tszMsg = mir_utf8decodeT( msg ); else if ( flags & PREF_UNICODE ) tszMsg = mir_u2t(( wchar_t* )&msg[ strlen( msg )+1 ] ); @@ -252,7 +241,7 @@ int TwitterProto::OnEvent(PROTOEVENTTYPE event,WPARAM wParam,LPARAM lParam) int TwitterProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam) { - return (int)CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWITTERACCOUNT), + return (int)CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWITTERACCOUNT), (HWND)lParam, first_run_dialog, (LPARAM)this ); } @@ -361,7 +350,7 @@ int TwitterProto::OnOptionsInit(WPARAM wParam,LPARAM lParam) odp.pfnDlgProc = options_proc; Options_AddPage(wParam, &odp); - if(ServiceExists(MS_POPUP_ADDPOPUPT)) + if(ServiceExists(MS_POPUP_ADDPOPUPT)) { odp.ptszTab = LPGENT("PopUps"); odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_POPUPS); @@ -412,7 +401,7 @@ int TwitterProto::OnModulesLoaded(WPARAM wParam,LPARAM lParam) GCREGISTER gcr = {sizeof(gcr)}; gcr.pszModule = m_szModuleName; gcr.pszModuleDispName = m_szModuleName; - gcr.iMaxText = 159; + gcr.iMaxText = 159; CallService(MS_GC_REGISTER,0,reinterpret_cast(&gcr)); if (ServiceExists(MS_HISTORYEVENTS_REGISTER)) diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h index 0aa4920f83..a07e2f16ce 100644 --- a/protocols/Twitter/src/proto.h +++ b/protocols/Twitter/src/proto.h @@ -54,7 +54,6 @@ public: virtual int __cdecl FileResume(HANDLE,int *,const TCHAR **); virtual DWORD_PTR __cdecl GetCaps(int,HANDLE = 0); - virtual HICON __cdecl GetIcon(int); virtual int __cdecl GetInfo(HANDLE,int); virtual HANDLE __cdecl SearchBasic(const TCHAR *); -- cgit v1.2.3