summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/LCDFramework
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/MirandaG15/src/LCDFramework
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework')
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp14
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDDevice.h2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp12
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp24
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp12
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp6
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp12
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/misc.cpp2
9 files changed, 43 insertions, 43 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp
index bd882b136f..768e586c39 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp
@@ -166,10 +166,10 @@ bool CLCDConnectionLogitech::Initialize(tstring strAppletName, bool bAutostart,
//************************************************************************
tstring CLCDConnectionLogitech::GetDeviceName() {
if (m_pConnectedDevice->GetIndex() == LGLCD_DEVICE_BW) {
- return _T("G15/Z10");
+ return L"G15/Z10";
}
else {
- return _T("G19");
+ return L"G19";
}
}
@@ -237,7 +237,7 @@ bool CLCDConnectionLogitech::Connect(int iIndex)
m_hConnection = m_connectContext.connection;
m_hDevice = LGLCD_INVALID_CONNECTION;
- TRACE(_T("CLCDConnectionLogitech: Connection to LCDManager established successfully!\n"));
+ TRACE(L"CLCDConnectionLogitech: Connection to LCDManager established successfully!\n");
}
else {
return false;
@@ -323,7 +323,7 @@ bool CLCDConnectionLogitech::Shutdown()
//************************************************************************
bool CLCDConnectionLogitech::HIDReadData(BYTE* data) {
static OVERLAPPED olRead;
- static HANDLE hReadEvent = CreateEvent(NULL, false, true, _T("ReadEvent"));
+ static HANDLE hReadEvent = CreateEvent(NULL, false, true, L"ReadEvent");
static BYTE privateBuffer[9];
DWORD TransBytes;
@@ -460,7 +460,7 @@ bool CLCDConnectionLogitech::Update()
}
}
if (button != 0) {
- TRACE(_T("GKey pressed: %d \n"), button);
+ TRACE(L"GKey pressed: %d \n", button);
}
}
@@ -630,14 +630,14 @@ void CLCDConnectionLogitech::HandleErrorFromAPI(DWORD dwRes)
break;
// we lost our device
case ERROR_DEVICE_NOT_CONNECTED:
- TRACE(_T("CLCDConnectionLogitech::HandleErrorFromAPI(): Device was unplugged, closing device\n"));
+ TRACE(L"CLCDConnectionLogitech::HandleErrorFromAPI(): Device was unplugged, closing device\n");
Disconnect();
SetReconnect(true);
SetVolumeWheelHook(false);
break;
default:
- TRACE(_T("CLCDConnectionLogitech::HandleErrorFromAPI(): FATAL ERROR, closing device and connection\n"));
+ TRACE(L"CLCDConnectionLogitech::HandleErrorFromAPI(): FATAL ERROR, closing device and connection\n");
Disconnect();
SetReconnect(true);
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h
index d7d2efe35e..5d4776e0f5 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h
@@ -42,7 +42,7 @@ public:
// Returns the display name
tstring GetDisplayName() {
- return m_iBPP == 1? _T("G15") : _T("G19");
+ return m_iBPP == 1? L"G15" : L"G19";
}
// Returns the display size
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp
index b258952b16..7d874a7a33 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp
@@ -60,7 +60,7 @@ bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, PBYTE pLcdBitmapBits
m_hDC = CreateCompatibleDC(NULL);
if(NULL == m_hDC)
{
- TRACE(_T("CLCDGfx::Initialize(): failed to create compatible DC.\n"));
+ TRACE(L"CLCDGfx::Initialize(): failed to create compatible DC.\n");
Shutdown();
return false;
}
@@ -69,7 +69,7 @@ bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, PBYTE pLcdBitmapBits
m_pBitmapInfo = (BITMAPINFO *) new BYTE [nBMISize];
if(NULL == m_pBitmapInfo)
{
- TRACE(_T("CLCDGfx::Initialize(): failed to allocate bitmap info.\n"));
+ TRACE(L"CLCDGfx::Initialize(): failed to allocate bitmap info.\n");
Shutdown();
return false;
}
@@ -100,7 +100,7 @@ bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, PBYTE pLcdBitmapBits
m_hBitmap = CreateDIBSection(m_hDC, m_pBitmapInfo, DIB_RGB_COLORS, (PVOID *) &m_pBitmapBits, NULL, 0);
if(NULL == m_hBitmap)
{
- TRACE(_T("CLCDGfx::Initialize(): failed to create bitmap.\n"));
+ TRACE(L"CLCDGfx::Initialize(): failed to create bitmap.\n");
Shutdown();
return false;
}
@@ -317,7 +317,7 @@ void CLCDGfx::DrawText(int nX,int nY,int nWidth,tstring strText)
SIZE sizeLine = {0, 0};
SIZE sizeCutOff = {0, 0};
- GetTextExtentPoint(GetHDC(),_T("..."),3,&sizeCutOff);
+ GetTextExtentPoint(GetHDC(),L"...",3,&sizeCutOff);
int *piWidths = new int[strText.length()];
int iMaxChars = 0;
@@ -329,7 +329,7 @@ void CLCDGfx::DrawText(int nX,int nY,int nWidth,tstring strText)
if(piWidths[iMaxChars] + sizeCutOff.cx <= nWidth)
break;
- DrawText(nX,nY,(strText.substr(0,iMaxChars) + _T("...")).c_str());
+ DrawText(nX,nY,(strText.substr(0,iMaxChars) + L"...").c_str());
}
else DrawText(nX,nY,strText.c_str());
delete[] piWidths;
@@ -721,7 +721,7 @@ void CLCDGfx::Cache()
m_dwTransitionStart = GetTickCount();
- TRACE(_T("Textmorphing: time consumed: %0.2f\n"),(double)(m_dwTransitionStart-dwStart)/(double)1000);
+ TRACE(L"Textmorphing: time consumed: %0.2f\n",(double)(m_dwTransitionStart-dwStart)/(double)1000);
}
//************************************************************************
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
index 547216ac09..1ca9bd4378 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
@@ -298,9 +298,9 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam)
/*
if(bKeyDown)
- TRACE(_T("Key pressed: %i\n"),key->vkCode);
+ TRACE(L"Key pressed: %i\n",key->vkCode);
else
- TRACE(_T("Key released: %i\n"),key->vkCode);
+ TRACE(L"Key released: %i\n",key->vkCode);
*/
// Only handle Keyup
if(bKeyDown)
@@ -310,7 +310,7 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam)
&& m_acKeyboardState[VK_SHIFT] & 0x80)
{
ActivateKeyboardLayout((HKL)HKL_NEXT,0);//KLF_SETFORPROCESS);
- TRACE(_T("Keyboardlayout switched!\n"));
+ TRACE(L"Keyboardlayout switched!\n");
return 1;
}
@@ -566,7 +566,7 @@ void CLCDInput::Reset()
memset(&m_Marker[0], 0, sizeof(SMarker));
- m_strText = _T("");
+ m_strText = L"";
m_vLineOffsets.clear();
m_iLinePosition = 0;
SLineEntry offset;
@@ -623,7 +623,7 @@ void CLCDInput::UpdateOffsets(int iModified)
bool bLineClosed = false;
- // TRACE(_T("InputText: Begin Update at #%i\n"),iLine);
+ // TRACE(L"InputText: Begin Update at #%i\n",iLine);
for(;iLine<m_vLineOffsets.size();iLine++)
{
bLineClosed = false;
@@ -633,7 +633,7 @@ void CLCDInput::UpdateOffsets(int iModified)
if(!(iLen == 0) && iChar > iLen)
{
- // TRACE(_T("InputText: Deleted offset #%i\n"),iLine);
+ // TRACE(L"InputText: Deleted offset #%i\n",iLine);
m_vLineOffsets.erase(m_vLineOffsets.begin()+iLine);
continue;
}
@@ -647,7 +647,7 @@ void CLCDInput::UpdateOffsets(int iModified)
iWordOffset= iChar;
GetTextExtentExPoint(hDC,pszText+iChar,iLen-iChar,GetWidth(),&iMaxChars,piWidths,&sizeLine);
- pos = m_strText.find(_T("\n"),iChar);
+ pos = m_strText.find(L"\n",iChar);
// check for linebreaks
if(pos != tstring::npos && pos >= iChar && pos <= iChar + iMaxChars)
{
@@ -658,7 +658,7 @@ void CLCDInput::UpdateOffsets(int iModified)
else
{
// find the last space in the line
- pos = m_strText.rfind(_T(" "),iChar + iMaxChars);
+ pos = m_strText.rfind(L" ",iChar + iMaxChars);
if(pos != tstring::npos && pos >= iChar)
iWordOffset = (int)pos +1;
else
@@ -701,7 +701,7 @@ void CLCDInput::UpdateOffsets(int iModified)
// if there are other offsets in front of this one, delete them
if(iLine2 != iLine + 1 )
{
- // TRACE(_T("InputText: Deleted offsets #%i to #%i\n"),iLine+1,iLine2-1);
+ // TRACE(L"InputText: Deleted offsets #%i to #%i\n",iLine+1,iLine2-1);
m_vLineOffsets.erase(m_vLineOffsets.begin()+iLine+1,m_vLineOffsets.begin()+iLine2);
}
break;
@@ -724,7 +724,7 @@ void CLCDInput::UpdateOffsets(int iModified)
else
m_vLineOffsets[iLine].iWidth = 0;
- // TRACE(_T("InputText: shifted offsets #%i to end %i position(s)\n"),iLine+1,iDistance);
+ // TRACE(L"InputText: shifted offsets #%i to end %i position(s)\n",iLine+1,iDistance);
for(iLine++;iLine<m_vLineOffsets.size();iLine++)
m_vLineOffsets[iLine].iOffset += iDistance;
@@ -742,7 +742,7 @@ void CLCDInput::UpdateOffsets(int iModified)
else
m_vLineOffsets.insert(m_vLineOffsets.begin()+iLine+1,offset);
- // TRACE(_T("InputText: Inserted new %soffset at #%i\n"),m_strText[iChar] == '\n'?_T("linebreak "):_T(""),iLine+1);
+ // TRACE(L"InputText: Inserted new %soffset at #%i\n",m_strText[iChar] == '\n'?L"linebreak ":L"",iLine+1);
}
break;
}
@@ -762,7 +762,7 @@ void CLCDInput::UpdateOffsets(int iModified)
if(iLine != m_vLineOffsets.size() - 1 && !bLineClosed)
{
- // TRACE(_T("InputText: Deleted offsets #%i to #%i\n"),iLine+1,m_vLineOffsets.size()-1);
+ // TRACE(L"InputText: Deleted offsets #%i to #%i\n",iLine+1,m_vLineOffsets.size()-1);
m_vLineOffsets.erase(m_vLineOffsets.begin()+iLine+1,m_vLineOffsets.end());
}
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp
index 38daccc7bf..2c0a0bd866 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp
@@ -11,7 +11,7 @@
CLCDLabel::CLCDLabel() : m_bCutOff(true), m_bWordWrap(false), m_iCutOffIndex(0),
m_iLineCount(0)
{
- m_strText = _T("");
+ m_strText = L"";
}
//************************************************************************
@@ -124,7 +124,7 @@ void CLCDLabel::UpdateCutOffIndex()
if(iLen <= 0)
{
- m_strCutOff = _T("");
+ m_strCutOff = L"";
m_iCutOffIndex = 0;
return;
}
@@ -162,7 +162,7 @@ void CLCDLabel::UpdateCutOffIndex()
if(m_strText[i] == '\n' || m_strText[i] == ' ')
i++;
- pos = m_strText.find(_T("\n"),i);
+ pos = m_strText.find(L"\n",i);
// check for linebreaks
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
@@ -170,7 +170,7 @@ void CLCDLabel::UpdateCutOffIndex()
else if(iMaxChars < iLen - i || sizeLine.cx >= GetWidth())
{
// find the last space in the line ( substract -1 from offset to ignore spaces as last chars )
- pos = m_strText.rfind(_T(" "),i + iMaxChars -1 );
+ pos = m_strText.rfind(L" ",i + iMaxChars -1 );
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
}
@@ -188,7 +188,7 @@ void CLCDLabel::UpdateCutOffIndex()
// calculate the cutoff position
- GetTextExtentPoint(hDC,_T("..."),3,&sizeCutOff);
+ GetTextExtentPoint(hDC,L"...",3,&sizeCutOff);
int *piWidths = new int[(*--m_vLines.end()).length()];
int iMaxChars = 0;
@@ -202,7 +202,7 @@ void CLCDLabel::UpdateCutOffIndex()
if(piWidths[iMaxChars] + sizeCutOff.cx <= iWidth)
break;
}
- (*--m_vLines.end()) = (*--m_vLines.end()).substr(0,iMaxChars) + _T("...");
+ (*--m_vLines.end()) = (*--m_vLines.end()).substr(0,iMaxChars) + L"...";
}
delete[] piWidths;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp
index 42bc3361de..cf8c680d12 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp
@@ -21,7 +21,7 @@ CLCDOutputManager::CLCDOutputManager() : m_dwButtonRepeatDelay(300), m_pGfx(0),
ASSERT(m_pInstance == NULL);
m_pInstance = this;
- m_strAppletName = _T("");
+ m_strAppletName = L"";
}
//************************************************************************
@@ -140,7 +140,7 @@ void CLCDOutputManager::InitializeGfxObject() {
if(m_pGfx->IsInitialized())
return;
- TRACE(_T("CLCDOutputManager::UpdateGfxObject(): initializing CLCDGfx\n"));
+ TRACE(L"CLCDOutputManager::UpdateGfxObject(): initializing CLCDGfx\n");
SIZE size;
size = m_pLcdConnection->GetDisplaySize();
@@ -176,7 +176,7 @@ void CLCDOutputManager::DeinitializeGfxObject() {
if(!m_pGfx->IsInitialized())
return;
- TRACE(_T("CLCDOutputManager::UpdateGfxObject(): shutting down CLCDGfx\n"));
+ TRACE(L"CLCDOutputManager::UpdateGfxObject(): shutting down CLCDGfx\n");
m_pGfx->Shutdown();
free(m_pbButtonStates);
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp
index 1db6536e08..f0c30b78cf 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp
@@ -299,8 +299,8 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry)
int iLen = (int)strString.size();
int i = 0;
- tstring strLine = _T("");
- tstring strWord = _T("");
+ tstring strLine = L"";
+ tstring strWord = L"";
SIZE sizeLine = {0, 0};
int *piExtents = new int[strString.length()];
@@ -320,7 +320,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry)
if(strString[i] == '\n' || strString[i] == ' ')
i++;
- pos = strString.rfind(_T("\n"),i+iMaxChars);
+ pos = strString.rfind(L"\n",i+iMaxChars);
// check for linebreaks
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
@@ -328,7 +328,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry)
else if(iMaxChars < iLen - i || sizeLine.cx >= GetWidth())
{
// find the last space in the line ( substract -1 from offset to ignore spaces as last chars )
- pos = strString.rfind(_T(" "),i + iMaxChars -1 );
+ pos = strString.rfind(L" ",i + iMaxChars -1 );
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
}
@@ -351,7 +351,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry)
sizeLine.cx += sizeWord.cx;
strLine += strWord;
- strWord = _T("");
+ strWord = L"";
sizeWord.cx = 0;
}
@@ -365,7 +365,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry)
}
pEntry->vLines.push_back(strLine);
- strLine = _T("");
+ strLine = L"";
sizeLine.cx = 0;
}
i++;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp
index ccbb420206..56c2d9f68c 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp
@@ -34,7 +34,7 @@ bool CLCDTextObject::Initialize()
m_hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
if(NULL != m_hFont)
{
- SetFontFaceName(_T("Small Fonts"));
+ SetFontFaceName(L"Small Fonts");
SetFontPointSize(6);
}
return true;
diff --git a/plugins/MirandaG15/src/LCDFramework/misc.cpp b/plugins/MirandaG15/src/LCDFramework/misc.cpp
index d4a491f446..968bb5ce6c 100644
--- a/plugins/MirandaG15/src/LCDFramework/misc.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/misc.cpp
@@ -111,7 +111,7 @@ tstring toLower(const tstring &i_str)
tstring Utf8_Decode(const char *str)
{
- tstring strRes = _T("");
+ tstring strRes = L"";
int i;
char *p;