summaryrefslogtreecommitdiff
path: root/plugins/Modernb
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Modernb')
-rw-r--r--plugins/Modernb/modern_clcitems.cpp5
-rw-r--r--plugins/Modernb/modern_clcpaint.cpp13
-rw-r--r--plugins/Modernb/modern_clistevents.cpp4
-rw-r--r--plugins/Modernb/modern_clistmod.cpp12
-rw-r--r--plugins/Modernb/modern_clistopts.cpp13
-rw-r--r--plugins/Modernb/modern_clistsettings.cpp18
-rw-r--r--plugins/Modernb/modern_commonheaders.cpp3
-rw-r--r--plugins/Modernb/modern_gdiplus.cpp12
-rw-r--r--plugins/Modernb/modern_skinbutton.cpp4
-rw-r--r--plugins/Modernb/modern_skinengine.cpp23
-rw-r--r--plugins/Modernb/modern_skinselector.cpp6
-rw-r--r--plugins/Modernb/modern_viewmodebar.cpp62
-rw-r--r--plugins/Modernb/modern_xptheme.cpp5
13 files changed, 29 insertions, 151 deletions
diff --git a/plugins/Modernb/modern_clcitems.cpp b/plugins/Modernb/modern_clcitems.cpp
index d938cad4eb..367bbb57de 100644
--- a/plugins/Modernb/modern_clcitems.cpp
+++ b/plugins/Modernb/modern_clcitems.cpp
@@ -256,11 +256,8 @@ void * AddTempGroup(HWND hwnd,struct ClcData *dat,const TCHAR *szName,DWORD flag
int f=0;
TCHAR * szGroupName;
DWORD groupFlags;
-#ifdef UNICODE
char *mbuf=mir_u2a((TCHAR *)szName);
-#else
- char *mbuf=mir_strdup((char *)szName);
-#endif
+
if (wildcmp(mbuf,"-@-HIDDEN-GROUP-@-",0))
{
mir_free_and_nill(mbuf);
diff --git a/plugins/Modernb/modern_clcpaint.cpp b/plugins/Modernb/modern_clcpaint.cpp
index 177d1b73ec..edc043da0f 100644
--- a/plugins/Modernb/modern_clcpaint.cpp
+++ b/plugins/Modernb/modern_clcpaint.cpp
@@ -668,16 +668,12 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
m = lstrlen( b2 );
for ( i = 0; i<m;i++ )
if ( b2[i] == TEXT( ',' ) ) b2[i] = TEXT( '.' );
-#ifdef UNICODE
- {
+ {
char* b3 = mir_utf8encodeT( b2 );
AddParam( mpModernMask, HASH[hi_Name], b3, 0 );
mir_free( b3 );
}
-#else
- AddParam( mpModernMask, HASH[hi_Name], b2, 0 );
-#endif
mir_free_and_nill( b2 );
}
if ( group->parent )
@@ -687,15 +683,12 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
m = lstrlen( b2 );
for ( i = 0; i<m;i++ )
if ( b2[i] == TEXT( ',' ) ) b2[i] = TEXT( '.' );
-#ifdef UNICODE
- {
+ {
char * b3 = mir_utf8encodeT( b2 );
AddParam( mpModernMask, HASH[hi_Group], b3, 0 );
mir_free( b3 );
}
-#else
- AddParam( mpModernMask, HASH[hi_Group], b2, 0 );
-#endif
+
mir_free_and_nill( b2 );
}
return mpModernMask;
diff --git a/plugins/Modernb/modern_clistevents.cpp b/plugins/Modernb/modern_clistevents.cpp
index e6cadaa02e..1c938a83aa 100644
--- a/plugins/Modernb/modern_clistevents.cpp
+++ b/plugins/Modernb/modern_clistevents.cpp
@@ -133,14 +133,10 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
if (nmi) {
TCHAR szBuffer[128];
TCHAR* szStatus = pcli->pfnGetStatusModeDescription(ModernGetSettingWord(p->cle.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
-#if defined(_UNICODE)
TCHAR szwProto[64];
MultiByteToWideChar(CP_ACP, 0, szProto, -1, szwProto, 64);
szwProto[63] = 0;
mir_sntprintf(szBuffer, SIZEOF(szBuffer), _T("%s: %s (%s)"), szwProto, szName, szStatus);
-#else
- mir_snprintf(szBuffer, SIZEOF(szBuffer), "%s: %s (%s)", szProto, szName, szStatus);
-#endif
szBuffer[127] = 0;
AppendMenu(g_CluiData.hMenuNotify, MF_BYCOMMAND | MF_STRING, g_CluiData.wNextMenuID, szBuffer);
mii.hbmpItem = HBMMENU_CALLBACK;
diff --git a/plugins/Modernb/modern_clistmod.cpp b/plugins/Modernb/modern_clistmod.cpp
index b23d121a25..baa92d5e95 100644
--- a/plugins/Modernb/modern_clistmod.cpp
+++ b/plugins/Modernb/modern_clistmod.cpp
@@ -235,11 +235,7 @@ INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam)
case CLUIF2_PLUGININFO:
return (INT_PTR)&pluginInfo;
case CLUIF2_CLISTTYPE:
- #ifdef UNICODE
- return 0x0107;
- #else
- return 0x0007;
- #endif
+ return 0x0107;
case CLUIF2_EXTRACOLUMNCOUNT:
return EXTRA_ICON_COUNT;
case CLUIF2_USEREXTRASTART:
@@ -314,11 +310,7 @@ HRESULT CluiLoadModule()
HINSTANCE hUser = GetModuleHandleA("USER32");
MyMonitorFromPoint = ( pfnMyMonitorFromPoint )GetProcAddress( hUser,"MonitorFromPoint" );
MyMonitorFromWindow = ( pfnMyMonitorFromWindow )GetProcAddress( hUser, "MonitorFromWindow" );
- #if defined( _UNICODE )
- MyGetMonitorInfo = ( pfnMyGetMonitorInfo )GetProcAddress( hUser, "GetMonitorInfoW");
- #else
- MyGetMonitorInfo = ( pfnMyGetMonitorInfo )GetProcAddress( hUser, "GetMonitorInfoA");
- #endif
+ MyGetMonitorInfo = ( pfnMyGetMonitorInfo )GetProcAddress( hUser, "GetMonitorInfoW");
}
CLUI::InitClui();
diff --git a/plugins/Modernb/modern_clistopts.cpp b/plugins/Modernb/modern_clistopts.cpp
index 482f6a3a5b..07092018a0 100644
--- a/plugins/Modernb/modern_clistopts.cpp
+++ b/plugins/Modernb/modern_clistopts.cpp
@@ -1231,7 +1231,7 @@ int ReserveExtraSlot(WPARAM wParam,LPARAM lParam)
{
OrderTreeData[iLastFree].fReserved=TRUE;
OrderTreeData[iLastFree].KeyName=pESINFO->pszSlotID;
-#ifdef UNICODE
+
if (pESINFO->fUnicode)
OrderTreeData[iLastFree].Name=pESINFO->ptszSlotName;
else
@@ -1239,16 +1239,7 @@ int ReserveExtraSlot(WPARAM wParam,LPARAM lParam)
OrderTreeData[iLastFree].Name=mir_a2u(pESINFO->pszSlotName); //potential memory leak but should not be more than once
OrderTreeData[iLastFree].fReserved=(BOOL)2; //need to free KeyName
}
-#else
- if (pESINFO->fUnicode)
- {
- OrderTreeData[iLastFree].Name=mir_u2a(pESINFO->pszSlotName); //potential memory leak but should not be more than once
- OrderTreeData[iLastFree].fReserved=(BOOL)2; //need to free KeyName
- }
- else
- OrderTreeData[iLastFree].Name=pESINFO->pszSlotName;
-#endif
- }
+ }
else return -1; // Already reserved
}
return iLastFree;
diff --git a/plugins/Modernb/modern_clistsettings.cpp b/plugins/Modernb/modern_clistsettings.cpp
index f04e0a860e..759b1ed8e3 100644
--- a/plugins/Modernb/modern_clistsettings.cpp
+++ b/plugins/Modernb/modern_clistsettings.cpp
@@ -121,9 +121,7 @@ void CListSettings_FreeCacheItemDataOption( pdisplayNameCacheEntry pDst, DWORD f
if (!pDst->isUnknown && pDst->m_cache_tcsName!=UnknownConctactTranslatedName) mir_free_and_nill(pDst->m_cache_tcsName);
}
- #if defined( _UNICODE )
- if (pDst->m_cache_szName) mir_free_and_nill(pDst->m_cache_szName);
- #endif
+ if (pDst->m_cache_szName) mir_free_and_nill(pDst->m_cache_szName);
}
if ( flag & CCI_GROUP )
@@ -155,9 +153,7 @@ void CListSettings_CopyCacheItems(pdisplayNameCacheEntry pDst, pdisplayNameCache
pDst->m_cache_tcsName = pSrc->m_cache_tcsName;
else
pDst->m_cache_tcsName=mir_tstrdup(pSrc->m_cache_tcsName);
- #if defined( _UNICODE )
- pDst->m_cache_szName=mir_strdup(pSrc->m_cache_szName);
- #endif
+ pDst->m_cache_szName=mir_strdup(pSrc->m_cache_szName);
}
if ( flag & CCI_GROUP ) pDst->m_cache_tcsGroup=mir_tstrdup(pSrc->m_cache_tcsGroup);
if ( flag & CCI_PROTO ) pDst->m_cache_cszProto=pSrc->m_cache_cszProto;
@@ -233,9 +229,7 @@ void cliFreeCacheItem( pdisplayNameCacheEntry p )
TRACEVAR("cliFreeCacheItem hContact=%d",hContact);
if ( !p->isUnknown && p->m_cache_tcsName && p->m_cache_tcsName!=UnknownConctactTranslatedName) mir_free_and_nill(p->m_cache_tcsName);
p->m_cache_tcsName = NULL;
- #if defined( _UNICODE )
- if ( p->m_cache_szName) { mir_free_and_nill(p->m_cache_szName); p->m_cache_szName = NULL; }
- #endif
+ if ( p->m_cache_szName) { mir_free_and_nill(p->m_cache_szName); p->m_cache_szName = NULL; }
if ( p->m_cache_tcsGroup) { mir_free_and_nill(p->m_cache_tcsGroup); p->m_cache_tcsGroup = NULL; }
if ( p->szSecondLineText) mir_free_and_nill(p->szSecondLineText);
if ( p->szThirdLineText) mir_free_and_nill(p->szThirdLineText);
@@ -263,9 +257,7 @@ void cliCheckCacheItem(pdisplayNameCacheEntry pdnce)
if (pdnce->m_cache_hContact==NULL) //selfcontact
{
if (!pdnce->m_cache_tcsName) pdnce->m_cache_tcsName=GetNameForContact(pdnce->m_cache_hContact,0,&pdnce->isUnknown);
-#ifdef _UNICODE
if (!pdnce->m_cache_szName) pdnce->m_cache_szName=mir_t2a(pdnce->m_cache_tcsName);
-#endif
return;
}
if (pdnce->m_cache_cszProto==NULL&&pdnce->m_cache_bProtoNotExists==FALSE)
@@ -307,9 +299,7 @@ void cliCheckCacheItem(pdisplayNameCacheEntry pdnce)
// what to return here???
pdnce->m_cache_tcsName = GetNameForContact(pdnce->m_cache_hContact,0,&pdnce->isUnknown); //TODO UNICODE
}
-#if defined( _UNICODE )
if (pdnce->m_cache_szName) mir_free_and_nill(pdnce->m_cache_szName);
-#endif
}
else
{
@@ -380,9 +370,7 @@ void cliCheckCacheItem(pdisplayNameCacheEntry pdnce)
pdnce->dwLastMsgTime=ModernGetSettingDword(pdnce->m_cache_hContact, "CList", "mf_lastmsg", 0);
if (pdnce->dwLastMsgTime==0) pdnce->dwLastMsgTime=CompareContacts2_getLMTime(pdnce->m_cache_hContact);
}
-#ifdef _UNICODE
if (!pdnce->m_cache_szName) pdnce->m_cache_szName=mir_t2a(pdnce->m_cache_tcsName);
-#endif
}
}
diff --git a/plugins/Modernb/modern_commonheaders.cpp b/plugins/Modernb/modern_commonheaders.cpp
index 86c1309884..eb78d351c7 100644
--- a/plugins/Modernb/modern_commonheaders.cpp
+++ b/plugins/Modernb/modern_commonheaders.cpp
@@ -65,12 +65,11 @@ int __cdecl ModernWriteSettingString(HANDLE hContact,const char *szModule,const
{
return DBWriteContactSettingString( hContact, szModule, szSetting, val );
}
-#ifdef _UNICODE
+
int __cdecl ModernWriteSettingWString(HANDLE hContact,const char *szModule,const char *szSetting,const WCHAR *val)
{
return DBWriteContactSettingWString( hContact, szModule, szSetting, val );
}
-#endif
int __cdecl ModernDBFreeVariant(DBVARIANT *dbv)
{
diff --git a/plugins/Modernb/modern_gdiplus.cpp b/plugins/Modernb/modern_gdiplus.cpp
index a71561a53d..4ab8604697 100644
--- a/plugins/Modernb/modern_gdiplus.cpp
+++ b/plugins/Modernb/modern_gdiplus.cpp
@@ -214,13 +214,7 @@ COLORREF __inline _revcolref(COLORREF colref)
BOOL GDIPlus_IsAnimatedGIF(TCHAR * szName)
{
int nFrameCount=0;
-#ifndef _UNICODE
- WCHAR * temp=mir_a2u(szName);
- Image image(temp);
- mir_free(temp);
-#else
Image image(szName);
-#endif
UINT count = 0;
count = image.GetFrameDimensionsCount();
@@ -240,13 +234,7 @@ BOOL GDIPlus_IsAnimatedGIF(TCHAR * szName)
void GDIPlus_ExtractAnimatedGIF(TCHAR * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar)
{
int nFrameCount=0;
-#ifndef _UNICODE
- WCHAR * temp=mir_a2u(szName);
- Bitmap image(temp);
- mir_free(temp);
-#else
Bitmap image(szName);
-#endif
PropertyItem * pPropertyItem;
UINT count = 0;
diff --git a/plugins/Modernb/modern_skinbutton.cpp b/plugins/Modernb/modern_skinbutton.cpp
index 1fb23e0ff4..cfbfa23b7e 100644
--- a/plugins/Modernb/modern_skinbutton.cpp
+++ b/plugins/Modernb/modern_skinbutton.cpp
@@ -693,16 +693,12 @@ static HWND ModernSkinButtonCreateWindow(ModernSkinButtonCtrl * bct, HWND parent
HWND hwnd;
if (bct==NULL) return FALSE;
-#ifdef _UNICODE
{
TCHAR *UnicodeID;
UnicodeID=mir_a2u(bct->ID);
hwnd=CreateWindow(_T(MODERNSKINBUTTONCLASS),UnicodeID,WS_VISIBLE|WS_CHILD,bct->Left,bct->Top,bct->Right-bct->Left,bct->Bottom-bct->Top,parent,NULL,g_hInst,NULL);
mir_free(UnicodeID);
}
-#else
- hwnd=CreateWindow(_T(MODERNSKINBUTTONCLASS),bct->ID,WS_VISIBLE|WS_CHILD,bct->Left,bct->Top,bct->Right-bct->Left,bct->Bottom-bct->Top,parent,NULL,g_hInst,NULL);
-#endif
bct->hwnd = hwnd;
bct->focus = 0;
diff --git a/plugins/Modernb/modern_skinengine.cpp b/plugins/Modernb/modern_skinengine.cpp
index 0a9e4c806a..487285304e 100644
--- a/plugins/Modernb/modern_skinengine.cpp
+++ b/plugins/Modernb/modern_skinengine.cpp
@@ -2683,16 +2683,12 @@ static int ske_DeleteAllSettingInSection(char * SectionName)
BOOL ske_TextOutA(HDC hdc, int x, int y, char * lpString, int nCount)
{
-#ifdef UNICODE
TCHAR *buf=(TCHAR *)mir_alloc((2+nCount)*sizeof(TCHAR));
BOOL res;
MultiByteToWideChar(CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ), 0, lpString, -1, buf, (2+nCount)*sizeof(TCHAR));
res=ske_TextOut(hdc,x,y,buf,nCount);
mir_free_and_nill(buf);
return res;
-#else
- return ske_TextOut(hdc,x,y,lpString,nCount);
-#endif
}
BOOL ske_TextOut(HDC hdc, int x, int y, LPCTSTR lpString, int nCount)
@@ -3266,15 +3262,11 @@ INT_PTR ske_Service_DrawTextWithEffect( WPARAM wParam, LPARAM lParam )
BOOL ske_DrawTextA(HDC hdc, char * lpString, int nCount, RECT * lpRect, UINT format)
{
-#ifdef UNICODE
TCHAR *buf=mir_a2u(lpString);
BOOL res;
res=ske_DrawText(hdc,buf,nCount,lpRect,format);
mir_free(buf);
return res;
-#else
- return ske_DrawText(hdc,lpString,nCount,lpRect,format);
-#endif
}
@@ -4285,11 +4277,7 @@ TCHAR* ske_ReplaceVar(TCHAR *var)
buf[i]='\0';
}
mir_free_and_nill(var);
-#ifdef UNICODE
return mir_a2u(buf);
-#else
- return mir_strdup(buf);
-#endif
}
mir_free_and_nill(var);
@@ -4397,13 +4385,8 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS
glText->dwColor=ske_HexToARGB(GetParamN(szDefineString,buf,sizeof(buf),7,',',TRUE));
glText->dwShadow=ske_HexToARGB(GetParamN(szDefineString,buf,sizeof(buf),8,',',TRUE));
-#ifdef _UNICODE
glText->stValueText=mir_a2u(GetParamN(szDefineString,buf,sizeof(buf),9,',',TRUE));
glText->stText=ske_ParseText(glText->stValueText);
-#else
- glText->stValueText=mir_strdup(GetParamN(szDefineString,buf,sizeof(buf),9,',',TRUE));
- glText->stText=ske_ParseText(glText->stValueText);
-#endif
li.List_Insert(globj->plTextList,(void*)glText,globj->plTextList->realCount);
qsort(globj->plTextList->items,globj->plTextList->realCount,sizeof(void*),(int(*)(const void*, const void*))globj->plTextList->sortFunc);
}
@@ -4441,13 +4424,9 @@ static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineStri
glText->dwColor=ske_HexToARGB(GetParamN(szDefineString,buf,sizeof(buf),7,',',TRUE));
glText->dwShadow=ske_HexToARGB(GetParamN(szDefineString,buf,sizeof(buf),8,',',TRUE));
-#ifdef _UNICODE
glText->stValueText=mir_a2u(GetParamN(szDefineString,buf,sizeof(buf),9,',',TRUE));
glText->stText=ske_ParseText(glText->stValueText);
-#else
- glText->stValueText=mir_strdup(GetParamN(szDefineString,buf,sizeof(buf),9,',',TRUE));
- glText->stText=ske_ParseText(glText->stValueText);
-#endif
+
if (!Skin->pTextList)
Skin->pTextList=li.List_Create(0,1);
li.List_InsertPtr(Skin->pTextList,glText);
diff --git a/plugins/Modernb/modern_skinselector.cpp b/plugins/Modernb/modern_skinselector.cpp
index aef06d5fb9..2540790d53 100644
--- a/plugins/Modernb/modern_skinselector.cpp
+++ b/plugins/Modernb/modern_skinselector.cpp
@@ -86,7 +86,6 @@ BOOL wildcmpi(TCHAR* name, TCHAR* mask)
}
}
-#if defined( _UNICODE )
BOOL wildcmpi(char * name, char * mask)
{
char * last='\0';
@@ -107,7 +106,6 @@ BOOL wildcmpi(char * name, char * mask)
if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name) ) name -= (size_t)(mask - last) - 1, mask = last;
}
}
-#endif
BOOL __inline wildcmp(const char * name, const char * mask, BYTE option)
{
@@ -574,15 +572,11 @@ SKINOBJECTDESCRIPTOR * skin_FindObjectByRequest(char * szValue,LISTMODERNMASK *
TCHAR * GetParamNT(char * string, TCHAR * buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces)
{
-#ifdef UNICODE
char *ansibuf=(char*)mir_alloc(buflen/sizeof(TCHAR));
GetParamN(string, ansibuf, buflen/sizeof(TCHAR), paramN, Delim, SkipSpaces);
MultiByteToWideChar(CP_UTF8,0,ansibuf,-1,buf,buflen);
mir_free_and_nill(ansibuf);
return buf;
-#else
- return GetParamN(string, buf, buflen, paramN, Delim, SkipSpaces);
-#endif
}
char * GetParamN(char * string, char * buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces)
diff --git a/plugins/Modernb/modern_viewmodebar.cpp b/plugins/Modernb/modern_viewmodebar.cpp
index 37b1e1b66f..c896e3b852 100644
--- a/plugins/Modernb/modern_viewmodebar.cpp
+++ b/plugins/Modernb/modern_viewmodebar.cpp
@@ -118,7 +118,6 @@ int FillModes(char *szsetting)
if(szsetting[0] == (char)13)
return 1;
-#ifdef _UNICODE
{
TCHAR * temp;
//temp=alloca((strlen(szSetting)+1)*sizeof(TCHAR));
@@ -129,10 +128,7 @@ int FillModes(char *szsetting)
mir_free(temp);
}
}
-#else
- SendDlgItemMessage(clvmHwnd, IDC_VIEWMODES, LB_INSERTSTRING, -1, (LPARAM)szsetting);
-#endif
- return 1;
+ return 1;
}
static void ShowPage(HWND hwnd, int page)
@@ -489,13 +485,11 @@ void SaveState()
//if(vastring)
// GetDlgItemTextA(clvmHwnd, IDC_VARIABLES, vastring, len);
SendDlgItemMessage(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szTempModeName);
-#ifdef _UNICODE
+
{
szModeName=mir_utf8encodeT(szTempModeName);
}
-#else
- szModeName=szTempModeName;
-#endif
+
dwGlobalMask = GetMaskForItem(hInfoItem);
hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while(hContact)
@@ -574,12 +568,8 @@ static void UpdateFilters()
szTempBuf= (TCHAR *)mir_alloc((iLen + 1)*sizeof(TCHAR));
SendDlgItemMessage(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szTempBuf);
-#ifdef _UNICODE
szBuf=mir_utf8encodeT(szTempBuf);
-#else
- szBuf=mir_strdup(szTempBuf);
-#endif
- strncpy(g_szModename, szBuf, SIZEOF(g_szModename));
+ strncpy(g_szModename, szBuf, SIZEOF(g_szModename));
g_szModename[SIZEOF(g_szModename) - 1] = 0;
mir_sntprintf(szTemp, 100, TranslateT("Configuring view mode: %s"), szTempBuf);
SetDlgItemText(clvmHwnd, IDC_CURVIEWMODE2, szTemp);
@@ -790,12 +780,8 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if ( g_CluiData.current_viewmode[0]!='\0' )
{
TCHAR * temp=
-#ifdef _UNICODE
- mir_utf8decodeW( g_CluiData.current_viewmode );
-#else
- mir_strdup( g_CluiData.current_viewmode );
-#endif
-
+ mir_utf8decodeW( g_CluiData.current_viewmode );
+
if(temp)
{
index = SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_FINDSTRING, -1, (LPARAM)temp );
@@ -869,11 +855,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETTEXT, SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETCURSEL, 0, 0), (LPARAM)szTempBuf);
-#ifdef _UNICODE
szBuf=mir_utf8encodeT(szTempBuf);
-#else
- szBuf=szTempBuf;
-#endif
DeleteViewMode( szBuf );
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_DELETESTRING, SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETCURSEL, 0, 0), 0);
@@ -907,12 +889,9 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if(lstrlen(szBuf) > 0)
{
char *szUTF8Buf=NULL;
-#ifdef UNICODE
szUTF8Buf=mir_utf8encodeT(szBuf);
-#else
- szUTF8Buf=_strdup(szBuf);
-#endif
- if(ModernGetSettingDword(NULL, CLVM_MODULE, szUTF8Buf, -1) != -1)
+
+ if(ModernGetSettingDword(NULL, CLVM_MODULE, szUTF8Buf, -1) != -1)
MessageBox(0, TranslateT("A view mode with this name does alredy exist"), TranslateT("Duplicate name"), MB_OK);
else
{
@@ -1053,7 +1032,7 @@ static int FillMenuCallback(char *szSetting)
return 1;
if(szSetting[0] == (char)13)
return 1;
-#ifdef _UNICODE
+
{
TCHAR * temp;
//temp=alloca((strlen(szSetting)+1)*sizeof(TCHAR));
@@ -1064,10 +1043,7 @@ static int FillMenuCallback(char *szSetting)
mir_free(temp);
}
}
-#else
- AppendMenuA(hViewModeMenu, MF_STRING, menuCounter++, szSetting);
-#endif
- return 1;
+ return 1;
}
void BuildViewModeMenu()
@@ -1176,7 +1152,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
}
if(g_CluiData.bFilterEffective)
{
-#ifdef _UNICODE
+
{
TCHAR * temp;
//temp=alloca((strlen(szSetting)+1)*sizeof(TCHAR));
@@ -1187,9 +1163,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
mir_free(temp);
}
}
-#else
- SetWindowTextA(GetDlgItem(hwnd, IDC_SELECTMODE), g_CluiData.current_viewmode);
-#endif
+
}
else
SetWindowText(GetDlgItem(hwnd, IDC_SELECTMODE), TranslateT("All contacts"));
@@ -1337,15 +1311,13 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
mii.dwTypeData = szTemp;
mii.cch = 256;
GetMenuItemInfo(hViewModeMenu, selection, FALSE, &mii);
-#ifdef _UNICODE
+
{
char * temp=mir_utf8encodeT(szTemp);
ApplyViewMode(temp);
if (temp) mir_free(temp);
}
-#else
- ApplyViewMode(szTemp);
-#endif
+
}
break;
}
@@ -1705,15 +1677,13 @@ void ApplyViewMode(const char *Name, bool onlySelector )
}
}
-#ifdef _UNICODE
+
{
TCHAR * temp = mir_utf8decodeW( ( name[0] == (char)13 ) ? name + 1 : name );
SetWindowText(hwndSelector, temp);
mir_free(temp);
}
-#else
- SetWindowText(hwndSelector, ( name[0] == (char)13 ) ? name + 1 : name );
-#endif
+
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
CLUI__cliInvalidateRect( pcli->hwndStatus, NULL, FALSE );
// SetButtonStates(pcli->hwndContactList);
diff --git a/plugins/Modernb/modern_xptheme.cpp b/plugins/Modernb/modern_xptheme.cpp
index 14e9614304..599cb55010 100644
--- a/plugins/Modernb/modern_xptheme.cpp
+++ b/plugins/Modernb/modern_xptheme.cpp
@@ -238,10 +238,6 @@ HRESULT xpt_DrawTheme(XPTHANDLE xptHandle, HWND hwnd, HDC hdc, int type, int sta
HRESULT xpt_DrawThemeText(XPTHANDLE xptHandle, HDC hdc, int type, int state, LPCTSTR lpStr, int len, DWORD flag1, DWORD flag2, const RECT * textRect)
{
-#ifndef _UNICODE
- ske_DrawText(hdc,lpStr,len, (RECT*)textRect, flag1);
- return S_OK;
-#else
HRESULT res=S_FALSE;
xptcheck S_FALSE;
xptlock();
@@ -251,7 +247,6 @@ HRESULT xpt_DrawThemeText(XPTHANDLE xptHandle, HDC hdc, int type, int state, LPC
ske_DrawText(hdc,lpStr,len, (RECT*)textRect, flag1);
xptunlock();
return S_OK;
-#endif
}
BOOL xpt_EnableThemeDialogTexture(HWND hwnd, DWORD flags)
{