From 4aa6229698b946e52ce19018aaf13f8b92fb168e Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Fri, 15 Jun 2012 14:13:45 +0000 Subject: another portion of "#ifsef Unicode" removal git-svn-id: http://svn.miranda-ng.org/main/trunk@426 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/clistmenus.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'src/modules/clist/clistmenus.cpp') diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 12b8d75761..e26ca5f13f 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -524,13 +524,9 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) prot = smep->proto; else { - #ifdef UNICODE - char *prn=mir_u2a(timi->mi.ptszName); - prot = NEWSTR_ALLOCA( prn ); - if (prn) mir_free(prn); - #else - prot = timi->mi.ptszName; - #endif + char *prn=mir_u2a(timi->mi.ptszName); + prot = NEWSTR_ALLOCA( prn ); + if (prn) mir_free(prn); } if ( Proto_GetAccount( prot ) == NULL ) return TRUE; @@ -1192,13 +1188,9 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam, LPARAM lParam) MenuProto* mp = FindProtocolMenu( mi->pszContactOwner ); if ( mp && mi->pszPopupName ) { if ( mp->pMenu ) { - #if defined _UNICODE - TCHAR* ptszName = ( mi->flags & CMIF_UNICODE ) ? mir_tstrdup(mi->ptszPopupName) : mir_a2t(mi->pszPopupName); - pRoot = MO_RecursiveWalkMenu( mp->pMenu->submenu.first, FindRoot, ptszName ); - mir_free( ptszName ); - #else - pRoot = MO_RecursiveWalkMenu( mp->pMenu->submenu.first, FindRoot, mi->pszPopupName ); - #endif + TCHAR* ptszName = ( mi->flags & CMIF_UNICODE ) ? mir_tstrdup(mi->ptszPopupName) : mir_a2t(mi->pszPopupName); + pRoot = MO_RecursiveWalkMenu( mp->pMenu->submenu.first, FindRoot, ptszName ); + mir_free( ptszName ); } if ( pRoot == NULL ) { TMO_MenuItem tmi = { 0 }; @@ -1241,15 +1233,13 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam, LPARAM lParam) smep->hMenuItem = menuHandle; char buf[MAX_PATH+64]; - #if defined( _UNICODE ) + { char* p = ( pRoot ) ? mir_t2a( pRoot->mi.ptszName ) : NULL; mir_snprintf( buf, SIZEOF(buf), "%s/%s", ( p ) ? p : "", mi->pszService ? mi->pszService : "" ); mir_free( p ); } - #else - mir_snprintf( buf, SIZEOF(buf), "%s/%s", pRoot ? pRoot->mi.ptszName : _T(""), mi->pszService ? mi->pszService : "" ); - #endif + MO_SetOptionsMenuItem( menuHandle, OPT_MENUITEMSETUNIQNAME, ( INT_PTR )buf ); return ( INT_PTR )menuHandle; -- cgit v1.2.3