From 37e1f0cb88e2344c288064b7d88963ba7ea26955 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 Jun 2012 17:17:39 +0000 Subject: - clists' menus compatibility issues; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@412 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IRCG/ircproto.cpp | 2 +- protocols/IRCG/services.cpp | 2 +- protocols/IcqOscarJ/icq_menu.cpp | 4 ++-- protocols/JabberG/jabber_menu.cpp | 20 ++++++++++---------- protocols/JabberG/jabber_proto.cpp | 2 +- protocols/Yahoo/proto.cpp | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'protocols') diff --git a/protocols/IRCG/ircproto.cpp b/protocols/IRCG/ircproto.cpp index f167eddad6..3fd32d1f68 100644 --- a/protocols/IRCG/ircproto.cpp +++ b/protocols/IRCG/ircproto.cpp @@ -1061,7 +1061,7 @@ int __cdecl CIrcProto::OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM case EV_PROTO_ONRENAME: if ( hMenuRoot ) { CLISTMENUITEM clmi = { 0 }; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; clmi.ptszName = m_tszUserName; CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hMenuRoot, ( LPARAM )&clmi ); diff --git a/protocols/IRCG/services.cpp b/protocols/IRCG/services.cpp index 745ebe80d6..63fd495b7a 100644 --- a/protocols/IRCG/services.cpp +++ b/protocols/IRCG/services.cpp @@ -131,7 +131,7 @@ static INT_PTR IrcMenuIgnore(WPARAM wParam, LPARAM lParam) int IrcPrebuildContactMenu( WPARAM wParam, LPARAM lParam ) { CLISTMENUITEM clmi = {0}; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_FLAGS | CMIF_HIDDEN; CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hUMenuChanSettings, ( LPARAM )&clmi ); diff --git a/protocols/IcqOscarJ/icq_menu.cpp b/protocols/IcqOscarJ/icq_menu.cpp index f6aeb99161..054cfd0b09 100644 --- a/protocols/IcqOscarJ/icq_menu.cpp +++ b/protocols/IcqOscarJ/icq_menu.cpp @@ -100,7 +100,7 @@ static INT_PTR IcqMenuHandleOpenProfile(WPARAM wParam, LPARAM lParam) static void sttEnableMenuItem( HANDLE hMenuItem, bool bEnable ) { CLISTMENUITEM clmi = {0}; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_FLAGS; if ( !bEnable ) clmi.flags |= CMIF_HIDDEN; @@ -134,7 +134,7 @@ void g_MenuInit(void) strcpy( str, "ICQ" ); CLISTMENUITEM mi = { 0 }; - mi.cbSize = sizeof( CLISTMENUITEM ); + mi.cbSize = sizeof(CLISTMENUITEM); mi.pszService = str; mi.flags = CMIF_ICONFROMICOLIB; diff --git a/protocols/JabberG/jabber_menu.cpp b/protocols/JabberG/jabber_menu.cpp index 4ddfaa7ea6..827a32011c 100644 --- a/protocols/JabberG/jabber_menu.cpp +++ b/protocols/JabberG/jabber_menu.cpp @@ -171,7 +171,7 @@ static INT_PTR JabberMenuHandleDirectPresence( WPARAM wParam, LPARAM lParam, LPA static void sttEnableMenuItem( HANDLE hMenuItem, BOOL bEnable ) { CLISTMENUITEM clmi = {0}; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_FLAGS; if ( !bEnable ) clmi.flags |= CMIF_HIDDEN; @@ -224,7 +224,7 @@ void g_MenuInit( void ) // Contact menu initialization CLISTMENUITEM mi = { 0 }; - mi.cbSize = sizeof( CLISTMENUITEM ); + mi.cbSize = sizeof(CLISTMENUITEM); // "Request authorization" mi.pszName = LPGEN("Request authorization"); @@ -408,7 +408,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM ) for (int i = 0; i < SIZEOF(PresenceModeArray); ++i) { CLISTMENUITEM clmi = {0}; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_ICON|CMIM_FLAGS; clmi.hIcon = (HICON)LoadSkinnedProtoIcon(m_szModuleName, PresenceModeArray[i].mode); CallService(MS_CLIST_MODIFYMENUITEM, ( WPARAM )g_hMenuDirectPresence[i+1], ( LPARAM )&clmi ); @@ -451,7 +451,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM ) sttEnableMenuItem( g_hMenuResourcesRoot, TRUE ); CLISTMENUITEM mi = {0}; - mi.cbSize = sizeof( CLISTMENUITEM ); + mi.cbSize = sizeof(CLISTMENUITEM); mi.flags = CMIM_ICON|CMIM_FLAGS; mi.icolibItem = GetIconHandle( IDI_JABBER ); CallService(MS_CLIST_MODIFYMENUITEM, ( WPARAM )g_hMenuResourcesRoot, ( LPARAM )&mi ); @@ -468,7 +468,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM ) size_t nModuleNameLength = strlen( text ); char* tDest = text + nModuleNameLength; - mi.cbSize = sizeof( CLISTMENUITEM ); + mi.cbSize = sizeof(CLISTMENUITEM); mi.flags = CMIF_CHILDPOPUP; mi.position = 0; mi.icolibItem = GetIconHandle( IDI_REQUEST ); @@ -487,7 +487,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM ) } if ( i < item->resourceCount ) { CLISTMENUITEM clmi = {0}; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_NAME|CMIM_FLAGS | CMIF_CHILDPOPUP|CMIF_TCHAR; if ((item->resourceMode == RSMODE_MANUAL) && (item->manualResource == i)) clmi.flags |= CMIF_CHECKED; @@ -510,7 +510,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM ) } ZeroMemory(&mi, sizeof(mi)); - mi.cbSize = sizeof( CLISTMENUITEM ); + mi.cbSize = sizeof(CLISTMENUITEM); mi.flags = CMIM_FLAGS | CMIF_CHILDPOPUP|CMIF_ICONFROMICOLIB | ((item->resourceMode == RSMODE_LASTSEEN) ? CMIF_CHECKED : 0); @@ -706,7 +706,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd( WPARAM wParam, LPARAM ) void CJabberProto::MenuInit() { CLISTMENUITEM mi = { 0 }; - mi.cbSize = sizeof( CLISTMENUITEM ); + mi.cbSize = sizeof(CLISTMENUITEM); char text[ 200 ]; strcpy( text, m_szModuleName ); @@ -1034,7 +1034,7 @@ void CJabberProto::EnableMenuItems( BOOL bEnable ) void CJabberProto::CheckMenuItems() { CLISTMENUITEM clmi = { 0 }; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_FLAGS; if ( !m_menuItemsStatus ) clmi.flags |= CMIF_GRAYED; @@ -1290,7 +1290,7 @@ CJabberProto *JabberChooseInstance(bool bIsLink) } CLISTMENUITEM clmi = {0}; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); int nItems = 0, lastItemId = 0; for (int i = 0; i < g_Instances.getCount(); ++i) { diff --git a/protocols/JabberG/jabber_proto.cpp b/protocols/JabberG/jabber_proto.cpp index 2457eab7a2..7d9ef3f14a 100644 --- a/protocols/JabberG/jabber_proto.cpp +++ b/protocols/JabberG/jabber_proto.cpp @@ -1656,7 +1656,7 @@ int __cdecl CJabberProto::OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPAR if ( m_hMenuRoot ) { CLISTMENUITEM clmi = { 0 }; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; clmi.ptszName = m_tszUserName; JCallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuRoot, ( LPARAM )&clmi ); diff --git a/protocols/Yahoo/proto.cpp b/protocols/Yahoo/proto.cpp index 37a3af24d1..4dd453a489 100644 --- a/protocols/Yahoo/proto.cpp +++ b/protocols/Yahoo/proto.cpp @@ -807,7 +807,7 @@ int __cdecl CYahooProto::OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARA case EV_PROTO_ONRENAME: if ( mainMenuRoot ) { CLISTMENUITEM clmi = { 0 }; - clmi.cbSize = sizeof( CLISTMENUITEM ); + clmi.cbSize = sizeof(CLISTMENUITEM); clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; clmi.ptszName = m_tszUserName; YAHOO_CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )mainMenuRoot, ( LPARAM )&clmi ); -- cgit v1.2.3