summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-14 16:22:13 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-14 16:22:13 +0000
commitd5d023f683b23fe26ddea93738cb721d532804f0 (patch)
tree21e7398686c7a5d1604d58bfb71ca4329c84be66 /protocols/JabberG
parente58823d961a630eb62e60d2ccb443761ba5f1704 (diff)
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/jabber.h13
-rw-r--r--protocols/JabberG/jabber_caps.cpp6
-rw-r--r--protocols/JabberG/jabber_console.cpp42
-rw-r--r--protocols/JabberG/jabber_disco.h6
-rw-r--r--protocols/JabberG/jabber_groupchat.cpp5
-rw-r--r--protocols/JabberG/jabber_iq_handlers.cpp6
-rw-r--r--protocols/JabberG/jabber_libstr.cpp2
-rw-r--r--protocols/JabberG/jabber_opt.cpp10
-rw-r--r--protocols/JabberG/jabber_secur.cpp6
-rw-r--r--protocols/JabberG/jabber_std.cpp7
-rw-r--r--protocols/JabberG/jabber_svc.cpp13
-rw-r--r--protocols/JabberG/jabber_thread.cpp36
-rw-r--r--protocols/JabberG/jabber_util.cpp15
-rw-r--r--protocols/JabberG/jabber_xml.cpp26
-rw-r--r--protocols/JabberG/jabber_xml.h2
-rw-r--r--protocols/JabberG/jabber_xstatus.cpp6
-rw-r--r--protocols/JabberG/ui_utils.cpp35
-rw-r--r--protocols/JabberG/ui_utils.h9
18 files changed, 43 insertions, 202 deletions
diff --git a/protocols/JabberG/jabber.h b/protocols/JabberG/jabber.h
index fd4e8a77b1..d3b13bf447 100644
--- a/protocols/JabberG/jabber.h
+++ b/protocols/JabberG/jabber.h
@@ -656,9 +656,7 @@ void __stdcall replaceStr( char*& dest, const char* src );
void __stdcall replaceStr( WCHAR*& dest, const WCHAR* src );
int lstrcmp_null(const TCHAR *s1, const TCHAR *s2);
char* __stdcall rtrim( char *string );
-#if defined( _UNICODE )
- TCHAR* __stdcall rtrim( TCHAR *string );
-#endif
+TCHAR* __stdcall rtrim( TCHAR *string );
//---- jabber_menu.c ------------------------------------------------
@@ -762,13 +760,8 @@ TCHAR* __stdcall JabberStripJid( const TCHAR* jid, TCHAR* dest, size_t de
int __stdcall JabberGetPictureType( const char* buf );
int __stdcall JabberGetPacketID( HXML n );
-#if defined( _UNICODE )
- #define JabberUnixToDosT JabberUnixToDosW
- #define JabberBase64DecodeT JabberBase64DecodeW
-#else
- #define JabberUnixToDosT JabberUnixToDos
- #define JabberBase64DecodeT JabberBase64Decode
-#endif
+#define JabberUnixToDosT JabberUnixToDosW
+#define JabberBase64DecodeT JabberBase64DecodeW
const TCHAR *JabberStrIStr( const TCHAR *str, const TCHAR *substr);
void JabberCopyText(HWND hwnd, TCHAR *text);
diff --git a/protocols/JabberG/jabber_caps.cpp b/protocols/JabberG/jabber_caps.cpp
index 6dfb279ba5..9c3f69b31f 100644
--- a/protocols/JabberG/jabber_caps.cpp
+++ b/protocols/JabberG/jabber_caps.cpp
@@ -697,11 +697,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest( HXML, CJabberIqInfo* pInfo, co
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("os")) << XCHILD( _T("value"), _T("Microsoft Windows"));
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("os_version")) << XCHILD( _T("value"), os );
}
- #ifdef _UNICODE
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("software")) << XCHILD( _T("value"), _T("Miranda IM Jabber Protocol (Unicode)"));
- #else
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("software")) << XCHILD( _T("value"), _T("Miranda IM Jabber Protocol"));
- #endif
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("software")) << XCHILD( _T("value"), _T("Miranda IM Jabber Protocol (Unicode)"));
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("software_version")) << XCHILD( _T("value"), _T(__VERSION_STRING));
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-version")) << XCHILD( _T("value"), szCoreVersion );
diff --git a/protocols/JabberG/jabber_console.cpp b/protocols/JabberG/jabber_console.cpp
index 9d750f6425..0f728b25ec 100644
--- a/protocols/JabberG/jabber_console.cpp
+++ b/protocols/JabberG/jabber_console.cpp
@@ -53,13 +53,8 @@ struct StringBuf
};
static void sttAppendBufRaw(StringBuf *buf, const char *str);
-
-#ifdef UNICODE
- static void sttAppendBufW(StringBuf *buf, const WCHAR *str);
- #define sttAppendBufT(a,b) (sttAppendBufW((a),(b)))
-#else
- #define sttAppendBufT(a,b) (sttAppendBufA((a),(b)))
-#endif
+static void sttAppendBufW(StringBuf *buf, const WCHAR *str);
+#define sttAppendBufT(a,b) (sttAppendBufW((a),(b)))
static void sttEmptyBuf(StringBuf *buf);
#define RTF_HEADER \
@@ -186,7 +181,6 @@ static void sttAppendBufRaw(StringBuf *buf, const char *str)
buf->offset += length;
}
-#ifdef UNICODE
static void sttAppendBufW(StringBuf *buf, const WCHAR *str)
{
char tmp[32];
@@ -214,38 +208,6 @@ static void sttAppendBufW(StringBuf *buf, const WCHAR *str)
}
sttAppendBufRaw(buf, "}");
}
-#else
- static void sttAppendBufA(StringBuf *buf, const char *str)
-
- {
- char tmp[32];
-
- if (!str) return;
-
- for (const char *p = str; *p; ++p)
-
- {
- if ((*p == '\\') || (*p == '{') || (*p == '}'))
- {
- tmp[0] = '\\';
- tmp[1] = (char)*p;
- tmp[2] = 0;
- } else
-
- {
- tmp[0] = (char)*p;
- tmp[1] = 0;
-
-
-
- }
- sttAppendBufRaw(buf, tmp);
- }
-
- }
-
- #define sttAppendBufW sttAppendBufA
-#endif
static void sttEmptyBuf(StringBuf *buf)
{
diff --git a/protocols/JabberG/jabber_disco.h b/protocols/JabberG/jabber_disco.h
index 9daca0ffb7..372a9b1379 100644
--- a/protocols/JabberG/jabber_disco.h
+++ b/protocols/JabberG/jabber_disco.h
@@ -28,12 +28,8 @@ Last change by : $Author: george.hazan $
#ifndef _JABBER_DISCO_H_
#define _JABBER_DISCO_H_
-#ifdef _UNICODE
- #define CHR_BULLET ((WCHAR)0x2022)
+#define CHR_BULLET ((WCHAR)0x2022)
// #define STR_BULLET L" \u2022 "
-#else
- #define CHR_BULLET '-'
-#endif
#define JABBER_DISCO_RESULT_NOT_REQUESTED 0
#define JABBER_DISCO_RESULT_ERROR -1
diff --git a/protocols/JabberG/jabber_groupchat.cpp b/protocols/JabberG/jabber_groupchat.cpp
index 4f6dde53df..6a60c59113 100644
--- a/protocols/JabberG/jabber_groupchat.cpp
+++ b/protocols/JabberG/jabber_groupchat.cpp
@@ -500,11 +500,8 @@ void CJabberDlgGcJoin::OnInitDialog()
else
{
OpenClipboard(m_hwnd);
-#ifdef UNICODE
HANDLE hData = GetClipboardData(CF_UNICODETEXT);
-#else
- HANDLE hData = GetClipboardData(CF_TEXT);
-#endif
+
if (hData)
{
TCHAR *buf = (TCHAR *)GlobalLock(hData);
diff --git a/protocols/JabberG/jabber_iq_handlers.cpp b/protocols/JabberG/jabber_iq_handlers.cpp
index bcb7192c5b..ca1a69ad44 100644
--- a/protocols/JabberG/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/jabber_iq_handlers.cpp
@@ -296,11 +296,7 @@ BOOL CJabberProto::OnIqRequestVersion( HXML, CJabberIqInfo* pInfo )
XmlNodeIq iq( _T("result"), pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_VERSION));
- #if defined( _UNICODE )
- query << XCHILD( _T("name"), _T("Miranda IM Jabber (Unicode)") );
- #else
- query << XCHILD( _T("name"), _T("Miranda IM Jabber") );
- #endif
+ query << XCHILD( _T("name"), _T("Miranda IM Jabber (Unicode)") );
query << XCHILD( _T("version"), _T(__VERSION_STRING) );
if ( m_options.ShowOSVersion )
diff --git a/protocols/JabberG/jabber_libstr.cpp b/protocols/JabberG/jabber_libstr.cpp
index 128528a266..78565bfa1a 100644
--- a/protocols/JabberG/jabber_libstr.cpp
+++ b/protocols/JabberG/jabber_libstr.cpp
@@ -63,7 +63,6 @@ int lstrcmp_null(const TCHAR *s1, const TCHAR *s2)
return lstrcmp(s1, s2);
}
-#if defined( _UNICODE )
TCHAR* __stdcall rtrim( TCHAR *string )
{
TCHAR* p = string + _tcslen( string ) - 1;
@@ -76,4 +75,3 @@ TCHAR* __stdcall rtrim( TCHAR *string )
}
return string;
}
-#endif
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp
index 5baae257e7..46665e7a63 100644
--- a/protocols/JabberG/jabber_opt.cpp
+++ b/protocols/JabberG/jabber_opt.cpp
@@ -38,11 +38,7 @@ static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
/////////////////////////////////////////////////////////////////////////////////////////
// JabberRegisterDlgProc - the dialog proc for registering new account
-#if defined( _UNICODE )
- #define STR_FORMAT _T("%s %s@%S:%d?")
-#else
- #define STR_FORMAT _T("%s %s@%s:%d?")
-#endif
+#define STR_FORMAT _T("%s %s@%S:%d?")
struct { TCHAR *szCode; TCHAR *szDescription; } g_LanguageCodes[] = {
{ _T("aa"), _T("Afar") },
@@ -968,11 +964,7 @@ public:
#include <io.h>
#define JM_STATUSCHANGED WM_USER+0x0001
-#ifdef UNICODE
#define fopent(name, mode) _wfopen(name, mode)
-#else
-#define fopent(name, mode) fopen(name, mode)
-#endif
enum {
RRA_FILLLIST = 0,
diff --git a/protocols/JabberG/jabber_secur.cpp b/protocols/JabberG/jabber_secur.cpp
index 12577bb9e2..2dc9c29e68 100644
--- a/protocols/JabberG/jabber_secur.cpp
+++ b/protocols/JabberG/jabber_secur.cpp
@@ -70,13 +70,9 @@ TNtlmAuth::~TNtlmAuth()
bool TNtlmAuth::getSpn( TCHAR* szSpn, size_t dwSpnLen )
{
-#ifdef UNICODE
GetUserNameExType myGetUserNameEx =
( GetUserNameExType )GetProcAddress( GetModuleHandleA( "secur32.dll" ), "GetUserNameExW" );
-#else
- GetUserNameExType myGetUserNameEx =
- ( GetUserNameExType )GetProcAddress( GetModuleHandleA( "secur32.dll" ), "GetUserNameExA" );
-#endif
+
if ( !myGetUserNameEx ) return false;
TCHAR szFullUserName[128] = _T( "" );
diff --git a/protocols/JabberG/jabber_std.cpp b/protocols/JabberG/jabber_std.cpp
index abf40979a9..a480b82924 100644
--- a/protocols/JabberG/jabber_std.cpp
+++ b/protocols/JabberG/jabber_std.cpp
@@ -240,13 +240,8 @@ TCHAR* CJabberProto::JGetStringCrypt( HANDLE hContact, char* valueName )
return NULL;
sttCryptString(dbv.pszVal);
-
-#ifdef UNICODE
WCHAR *res = mir_utf8decodeW(dbv.pszVal);
-#else
- mir_utf8decode(dbv.pszVal, NULL);
- char *res = mir_strdup(dbv.pszVal);
-#endif
+
DBFreeVariant(&dbv);
return res;
diff --git a/protocols/JabberG/jabber_svc.cpp b/protocols/JabberG/jabber_svc.cpp
index ed5bfd7b78..37cc368549 100644
--- a/protocols/JabberG/jabber_svc.cpp
+++ b/protocols/JabberG/jabber_svc.cpp
@@ -521,12 +521,9 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI( WPARAM wParam, LPARAM l
szDelim = 0;
JabberHttpUrlDecode( szMsgBody );
} }
- #if defined(_UNICODE)
- CallService(MS_MSG_SENDMESSAGE "W",(WPARAM)hContact, (LPARAM)szMsgBody);
- #else
- CallService( MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)szMsgBody );
- #endif
-
+
+ CallService(MS_MSG_SENDMESSAGE "W",(WPARAM)hContact, (LPARAM)szMsgBody);
+
return 0;
}
return 1;
@@ -759,11 +756,7 @@ INT_PTR __cdecl CJabberProto::JabberGetApi( WPARAM wParam, LPARAM lParam )
DWORD CJabberInterface::GetFlags() const
{
-#ifdef _UNICODE
return JIF_UNICODE;
-#else
- return 0;
-#endif
}
int CJabberInterface::GetVersion() const
diff --git a/protocols/JabberG/jabber_thread.cpp b/protocols/JabberG/jabber_thread.cpp
index bfb3ba0129..116328250f 100644
--- a/protocols/JabberG/jabber_thread.cpp
+++ b/protocols/JabberG/jabber_thread.cpp
@@ -498,12 +498,8 @@ recvRest:
buffer[datalen] = '\0';
TCHAR* str;
- #if defined( _UNICODE )
- str = mir_utf8decodeW( buffer );
- #else
- str = buffer;
- #endif
-
+ str = mir_utf8decodeW( buffer );
+
int bytesParsed = 0;
XmlNode root( str, &bytesParsed, tag );
if ( root && tag )
@@ -516,18 +512,14 @@ recvRest:
root = XmlNode();
bytesParsed = 0;
}
- #if defined( _UNICODE )
- mir_free(str);
- #endif
+
+ mir_free(str);
+
}
else {
- #if defined( _UNICODE )
if ( root ) str[ bytesParsed ] = 0;
bytesParsed = ( root ) ? mir_utf8lenW( str ) : 0;
mir_free(str);
- #else
- bytesParsed = ( root ) ? bytesParsed : 0;
- #endif
}
Log( "bytesParsed = %d", bytesParsed );
@@ -1480,12 +1472,8 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
if (( szMessage = JabberUnixToDosT( szMessage )) == NULL )
szMessage = mir_tstrdup( _T(""));
- #if defined( _UNICODE )
char* buf = mir_utf8encodeW( szMessage );
- #else
- char* buf = mir_utf8encode( szMessage );
- #endif
-
+
if ( item != NULL ) {
if ( resourceStatus ) resourceStatus->bMessageSessionActive = TRUE;
if ( hContact != NULL )
@@ -2134,11 +2122,9 @@ int ThreadData::send( HXML node )
// strip forbidden control characters from outgoing XML stream
TCHAR *q = str;
for (TCHAR *p = str; *p; ++p) {
- #if defined( _UNICODE )
+
WCHAR c = *p;
- #else
- WCHAR c = *( BYTE* )p;
- #endif
+
if (c < 0x9 || c > 0x9 && c < 0xA || c > 0xA && c < 0xD || c > 0xD && c < 0x20 || c > 0xD7FF && c < 0xE000 || c > 0xFFFD)
continue;
@@ -2146,13 +2132,11 @@ int ThreadData::send( HXML node )
}
*q = 0;
- #if defined( _UNICODE )
+
char* utfStr = mir_utf8encodeT( str );
int result = send( utfStr, (int)strlen( utfStr ));
mir_free( utfStr );
- #else
- int result = send( str, (int)strlen( str ));
- #endif
+
xi.freeMem( str );
return result;
}
diff --git a/protocols/JabberG/jabber_util.cpp b/protocols/JabberG/jabber_util.cpp
index c6fee74296..7c9867a377 100644
--- a/protocols/JabberG/jabber_util.cpp
+++ b/protocols/JabberG/jabber_util.cpp
@@ -354,12 +354,9 @@ void __stdcall JabberUtfToTchar( const char* pszValue, size_t cbLen, LPTSTR& des
JabberUrlDecode( pszCopy );
- #if defined( _UNICODE )
- mir_utf8decode( pszCopy, &dest );
- #else
- mir_utf8decode( pszCopy, NULL );
- dest = mir_strdup( pszCopy );
- #endif
+
+ mir_utf8decode( pszCopy, &dest );
+
if ( bNeedsFree )
free( pszCopy );
@@ -678,7 +675,6 @@ char* __stdcall JabberBase64Encode( const char* buffer, int bufferLen )
static unsigned char b64rtable[256];
-#ifdef _UNICODE
char* __stdcall JabberBase64DecodeW( const WCHAR* str, int *resultLen )
{
char *stra = mir_u2a(str);
@@ -686,7 +682,6 @@ char* __stdcall JabberBase64DecodeW( const WCHAR* str, int *resultLen )
mir_free(stra);
return res;
}
-#endif
char* __stdcall JabberBase64Decode( const char* str, int *resultLen )
{
@@ -1291,11 +1286,7 @@ void JabberCopyText(HWND hwnd, TCHAR *text)
TCHAR *s = (TCHAR *)GlobalLock(hMem);
lstrcpy(s, text);
GlobalUnlock(hMem);
-#ifdef UNICODE
SetClipboardData(CF_UNICODETEXT, hMem);
-#else
- SetClipboardData(CF_TEXT, hMem);
-#endif
CloseClipboard();
}
diff --git a/protocols/JabberG/jabber_xml.cpp b/protocols/JabberG/jabber_xml.cpp
index 33a5ddad21..70898199c9 100644
--- a/protocols/JabberG/jabber_xml.cpp
+++ b/protocols/JabberG/jabber_xml.cpp
@@ -30,29 +30,7 @@ Last change by : $Author: george.hazan $
#define TAG_MAX_LEN 128
#define ATTR_MAX_LEN 8192
-#if defined( _UNICODE )
- #define T2UTF(A) A
-#else
-
-struct T2UTF
-{
- T2UTF( const TCHAR* str ) :
- m_text( mir_utf8encodeT( str ))
- {}
-
- ~T2UTF()
- { mir_free( m_text );
- }
-
- __inline operator TCHAR*() const
- { return m_text;
- }
-
-private:
- TCHAR* m_text;
-};
-
-#endif
+#define T2UTF(A) A
/////////////////////////////////////////////////////////////////////////////////////////
// XmlNodeIq class members
@@ -240,7 +218,6 @@ HXML __fastcall xmlGetChild( HXML hXml, LPCTSTR key )
return xi.getNthChild( hXml, key, 0 );
}
-#if defined( _UNICODE )
HXML __fastcall xmlGetChild( HXML hXml, LPCSTR key )
{
LPTSTR wszKey = mir_a2t( key );
@@ -253,7 +230,6 @@ HXML __fastcall xmlGetChildByTag( HXML hXml, LPCTSTR key, LPCTSTR attrName, LPCT
{
return xi.getChildByAttrValue( hXml, key, attrName, attrValue );
}
-#endif
HXML __fastcall xmlGetChildByTag( HXML hXml, LPCSTR key, LPCSTR attrName, LPCTSTR attrValue )
{
diff --git a/protocols/JabberG/jabber_xml.h b/protocols/JabberG/jabber_xml.h
index 6a8ce23a3f..96cdbed413 100644
--- a/protocols/JabberG/jabber_xml.h
+++ b/protocols/JabberG/jabber_xml.h
@@ -366,7 +366,6 @@ public:
va_end(args);
}
-#ifdef _UNICODE
XPathFmt(HXML hXml, char *path, ...): XPath(hXml, m_buf)
{
*m_buf = 0;
@@ -379,7 +378,6 @@ public:
MultiByteToWideChar(CP_ACP, 0, buf, -1, m_buf, BUFSIZE);
va_end(args);
}
-#endif
private:
TCHAR m_buf[BUFSIZE];
diff --git a/protocols/JabberG/jabber_xstatus.cpp b/protocols/JabberG/jabber_xstatus.cpp
index fdd7a44e2e..efdb377edc 100644
--- a/protocols/JabberG/jabber_xstatus.cpp
+++ b/protocols/JabberG/jabber_xstatus.cpp
@@ -1382,11 +1382,7 @@ TCHAR* a2tf( const TCHAR* str, BOOL unicode )
if ( str == NULL )
return NULL;
- #if defined( _UNICODE )
- return ( unicode ) ? mir_tstrdup( str ) : mir_a2t(( char* )str );
- #else
- return mir_strdup( str );
- #endif
+ return ( unicode ) ? mir_tstrdup( str ) : mir_a2t(( char* )str );
}
void overrideStr( TCHAR*& dest, const TCHAR* src, BOOL unicode, const TCHAR* def = NULL )
diff --git a/protocols/JabberG/ui_utils.cpp b/protocols/JabberG/ui_utils.cpp
index 0e1fad9a44..b12e413c81 100644
--- a/protocols/JabberG/ui_utils.cpp
+++ b/protocols/JabberG/ui_utils.cpp
@@ -889,7 +889,6 @@ void CCtrlListView::AddColumn(int iSubItem, TCHAR *name, int cx)
void CCtrlListView::AddGroup(int iGroupId, TCHAR *name)
{
-#ifdef UNICODE
if (IsWinVerXPPlus())
{
LVGROUP lvg = {0};
@@ -900,7 +899,6 @@ void CCtrlListView::AddGroup(int iGroupId, TCHAR *name)
lvg.iGroupId = iGroupId;
InsertGroup(-1, &lvg);
}
-#endif
}
int CCtrlListView::AddItem(TCHAR *text, int iIcon, LPARAM lParam, int iGroupId)
@@ -912,13 +910,13 @@ int CCtrlListView::AddItem(TCHAR *text, int iIcon, LPARAM lParam, int iGroupId)
lvi.iImage = iIcon;
lvi.lParam = lParam;
-#ifdef UNICODE
+
if ((iGroupId >= 0) && IsWinVerXPPlus())
{
lvi.mask |= LVIF_GROUPID;
lvi.iGroupId = iGroupId;
}
-#endif
+
return InsertItem(&lvi);
}
@@ -2334,14 +2332,10 @@ TCHAR* CCtrlBase::GetText()
char* CCtrlBase::GetTextA()
{
- #ifdef UNICODE
- int length = GetWindowTextLength(m_hwnd) + 1;
- char *result = (char *)mir_alloc(length * sizeof(char));
- GetWindowTextA(m_hwnd, result, length);
- return result;
- #else
- return GetText();
- #endif
+ int length = GetWindowTextLength(m_hwnd) + 1;
+ char *result = (char *)mir_alloc(length * sizeof(char));
+ GetWindowTextA(m_hwnd, result, length);
+ return result;
}
TCHAR* CCtrlBase::GetText(TCHAR *buf, int size)
@@ -2353,13 +2347,9 @@ TCHAR* CCtrlBase::GetText(TCHAR *buf, int size)
char* CCtrlBase::GetTextA(char *buf, int size)
{
- #ifdef UNICODE
- GetWindowTextA(m_hwnd, buf, size);
- buf[size-1] = 0;
- return buf;
- #else
- return GetText(buf, size);
- #endif
+ GetWindowTextA(m_hwnd, buf, size);
+ buf[size-1] = 0;
+ return buf;
}
int CCtrlBase::GetInt()
@@ -2495,11 +2485,8 @@ INT_PTR CProtoIntDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
}
case WM_SETTEXT:
-#ifdef UNICODE
- if (m_show_label && IsWindowUnicode(m_hwnd))
-#else
- if (m_show_label && !IsWindowUnicode(m_hwnd))
-#endif
+ if (m_show_label && IsWindowUnicode(m_hwnd))
+
{
TCHAR *szTitle = (TCHAR *)lParam;
if (!_tcsstr(szTitle, m_proto_interface->m_tszUserName))
diff --git a/protocols/JabberG/ui_utils.h b/protocols/JabberG/ui_utils.h
index f9e7816d9e..4be15802db 100644
--- a/protocols/JabberG/ui_utils.h
+++ b/protocols/JabberG/ui_utils.h
@@ -104,13 +104,8 @@ typedef struct tagLVSETINFOTIP
int iItem;
int iSubItem;
} LVSETINFOTIP, *PLVSETINFOTIP;
-#ifndef _UNICODE
- #define LPLVCOLUMN LPLVCOLUMNA
- #define LPLVITEM LPLVITEMA
-#else
- #define LPLVCOLUMN LPLVCOLUMNW
- #define LPLVITEM LPLVITEMW
-#endif
+#define LPLVCOLUMN LPLVCOLUMNA
+#define LPLVITEM LPLVITEMA
#define LVN_BEGINSCROLL (LVN_FIRST-80)
#define LVN_ENDSCROLL (LVN_FIRST-81)
#define LVN_HOTTRACK (LVN_FIRST-21)