summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/CAppletManager.cpp
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/CAppletManager.cpp
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/CAppletManager.cpp')
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp154
1 files changed, 77 insertions, 77 deletions
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 1ce1f559bb..b1be837708 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -440,7 +440,7 @@ tstring CAppletManager::GetContactDisplayname(MCONTACT hContact, bool bShortened
tstring strNick = GetContactDisplayname(hContact, false);
if (strNick.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
- return strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("...");
+ return strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"...";
return strNick;
}
@@ -453,7 +453,7 @@ tstring CAppletManager::GetContactGroup(MCONTACT hContact)
DBVARIANT dbv;
int res = db_get_ts(hContact, "CList", "Group", &dbv);
- tstring strGroup = _T("");
+ tstring strGroup = L"";
if (!res)
strGroup = dbv.ptszVal;
@@ -536,15 +536,15 @@ tstring CAppletManager::GetFormattedTimestamp(tm *tm_time)
if (tm_time->tm_mday != tm_now.tm_mday || tm_time->tm_mon != tm_now.tm_mon) {
if (CConfig::GetBoolSetting(TIMESTAMP_SECONDS))
- _tcsftime(buffer, 128, _T("[%x %H:%M:%S]"), tm_time);
+ _tcsftime(buffer, 128, L"[%x %H:%M:%S]", tm_time);
else
- _tcsftime(buffer, 128, _T("[%x %H:%M]"), tm_time);
+ _tcsftime(buffer, 128, L"[%x %H:%M]", tm_time);
}
else {
if (CConfig::GetBoolSetting(TIMESTAMP_SECONDS))
- _tcsftime(buffer, 128, _T("[%H:%M:%S]"), tm_time);
+ _tcsftime(buffer, 128, L"[%H:%M:%S]", tm_time);
else
- _tcsftime(buffer, 128, _T("[%H:%M]"), tm_time);
+ _tcsftime(buffer, 128, L"[%H:%M]", tm_time);
}
return toTstring(buffer);
@@ -555,7 +555,7 @@ tstring CAppletManager::GetFormattedTimestamp(tm *tm_time)
//************************************************************************
void CAppletManager::HandleEvent(CEvent *pEvent)
{
- TRACE(_T("<< Event: %i\n"), (int)pEvent->eType);
+ TRACE(L"<< Event: %i\n", (int)pEvent->eType);
// check if the event's timestamp needs to be set
if (!pEvent->bTime) {
@@ -625,7 +625,7 @@ void CAppletManager::UpdateMessageJobs()
Event.hValue = (*iter)->hEvent;
Event.hContact = (*iter)->hContact;
Event.iValue = ACKRESULT_FAILED;
- Event.strValue = TranslateString(_T("Timeout: No response from contact/server"));
+ Event.strValue = TranslateString(L"Timeout: No response from contact/server");
HandleEvent(&Event);
@@ -764,11 +764,11 @@ MEVENT CAppletManager::SendMessageToContact(MCONTACT hContact, tstring strMessag
GCDEST gcd = { szProto, 0, GC_EVENT_SENDMESSAGE };
gcd.ptszID = dbv.ptszVal;
- tstring strID = tstring(gcd.ptszID) + _T(" - ") + tstring(_A2T(toNarrowString(pIRCCon->strNetwork).c_str()));
+ tstring strID = tstring(gcd.ptszID) + L" - " + tstring(_A2T(toNarrowString(pIRCCon->strNetwork).c_str()));
gcd.ptszID = (LPTSTR)strID.c_str();
GCEVENT gce = { sizeof(gce), &gcd };
- gce.ptszStatus = _T("");
+ gce.ptszStatus = L"";
gce.ptszText = (LPTSTR)strAscii.c_str();
gce.time = time(NULL);
gce.bIsMe = true;
@@ -887,42 +887,42 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd
pEvent->bNotification = true;
}
- pEvent->strDescription = strName + _T(": ") + pEvent->strValue;
- pEvent->strSummary = TranslateString(_T("New message from %s"), strName.c_str());
+ pEvent->strDescription = strName + L": " + pEvent->strValue;
+ pEvent->strSummary = TranslateString(L"New message from %s", strName.c_str());
break;
case EVENTTYPE_URL:
if (CConfig::GetBoolSetting(NOTIFY_URL))
pEvent->bNotification = true;
pEvent->eType = EVENT_URL;
- pEvent->strDescription = TranslateString(_T("Incoming URL from %s"), strName.c_str());
+ pEvent->strDescription = TranslateString(L"Incoming URL from %s", strName.c_str());
break;
case EVENTTYPE_CONTACTS:
if (CConfig::GetBoolSetting(NOTIFY_CONTACTS))
pEvent->bNotification = true;
- pEvent->strDescription = TranslateString(_T("Incoming contacts from %s"), strName.c_str());
+ pEvent->strDescription = TranslateString(L"Incoming contacts from %s", strName.c_str());
pEvent->eType = EVENT_CONTACTS;
break;
case EVENTTYPE_ADDED:
if (CConfig::GetBoolSetting(NOTIFY_CONTACTS))
pEvent->bNotification = true;
- pEvent->strDescription = TranslateString(_T("You were added by %s"), strName.c_str());
+ pEvent->strDescription = TranslateString(L"You were added by %s", strName.c_str());
pEvent->eType = EVENT_ADDED;
break;
case EVENTTYPE_AUTHREQUEST:
if (CConfig::GetBoolSetting(NOTIFY_CONTACTS))
pEvent->bNotification = true;
- pEvent->strDescription = TranslateString(_T("Incoming Authrequest!"));
+ pEvent->strDescription = TranslateString(L"Incoming Authrequest!");
pEvent->eType = EVENT_AUTHREQUEST;
break;
case EVENTTYPE_FILE:
if (CConfig::GetBoolSetting(NOTIFY_FILE))
pEvent->bNotification = true;
- pEvent->strDescription = TranslateString(_T("Incoming file from %s"), strName.c_str());
+ pEvent->strDescription = TranslateString(L"Incoming file from %s", strName.c_str());
pEvent->eType = EVENT_FILE;
break;
default:
@@ -932,7 +932,7 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd
if (CConfig::GetBoolSetting(NOTIFY_SHOWPROTO)) {
char *szProto = GetContactProto(pEvent->hContact);
- pEvent->strDescription = _T("(") + toTstring(szProto) + _T(") ") + pEvent->strDescription;
+ pEvent->strDescription = L"(" + toTstring(szProto) + L") " + pEvent->strDescription;
}
// Clean up
@@ -946,28 +946,28 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd
tstring CAppletManager::StripIRCFormatting(tstring strText)
{
tstring::size_type start = 0, i = 0;
- tstring strEntity = _T("");
- tstring strReplace = _T("");
+ tstring strEntity = L"";
+ tstring strReplace = L"";
while (i < strText.length()) {
- start = strText.find(_T("%"), i);
+ start = strText.find(L"%", i);
if (start != string::npos && start < strText.length() - 1) {
strEntity = strText[start + 1];
- if (strEntity == _T("%")) {
- strText.replace(start, 2, _T("%"));
+ if (strEntity == L"%") {
+ strText.replace(start, 2, L"%");
i = start + 1;
}
/*
- else if(strEntity == _T("b") || strEntity == _T("B") ||
- strEntity == _T("i") || strEntity == _T("I") ||
- strEntity ==_T("u") || strEntity == _T("U") ||
- strEntity == _T("C") ||strEntity == _T("F"))
+ else if(strEntity == L"b" || strEntity == L"B" ||
+ strEntity == L"i" || strEntity == L"I" ||
+ strEntity ==L"u" || strEntity == L"U" ||
+ strEntity == L"C" ||strEntity == L"F")
{
strText.erase(start,2);
i = start;
}
*/
- else if (strEntity == _T("c") || strEntity == _T("f")) {
+ else if (strEntity == L"c" || strEntity == L"f") {
strText.erase(start, 4);
i = start;
}
@@ -1004,7 +1004,7 @@ CIRCConnection *CAppletManager::CreateIRCConnection(tstring strProtocol)
{
CIRCConnection *pIRCCon = new CIRCConnection();
pIRCCon->strProtocol = strProtocol;
- pIRCCon->strNetwork = _T("");
+ pIRCCon->strNetwork = L"";
m_vIRCConnections.push_back(pIRCCon);
@@ -1112,24 +1112,24 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
GCDEST *gcd;
if (gce == NULL || (gcd = gce->pDest) == NULL) {
- TRACE(_T("<< [%s] skipping invalid event\n"));
+ TRACE(L"<< [%s] skipping invalid event\n");
return 0;
}
- TRACE(_T("<< [%s:%s] event %04X\n"), toTstring(gcd->pszModule).c_str(), gcd->ptszID, gcd->iType);
+ TRACE(L"<< [%s:%s] event %04X\n", toTstring(gcd->pszModule).c_str(), gcd->ptszID, gcd->iType);
// get the matching irc connection entry
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(toTstring(gcd->pszModule));
if (!pIRCCon) {
- TRACE(_T("<< [%s] connection not found, skipping event\n"), toTstring(gcd->pszModule).c_str());
+ TRACE(L"<< [%s] connection not found, skipping event\n", toTstring(gcd->pszModule).c_str());
return 0;
}
// fetch the network name
if (gcd->iType == GC_EVENT_CHANGESESSIONAME) {
- if (gcd->ptszID && !mir_tstrcmpi(gcd->ptszID, _T("Network log"))) {
+ if (gcd->ptszID && !mir_tstrcmpi(gcd->ptszID, L"Network log")) {
pIRCCon->strNetwork = toTstring(gce->ptszText);
- TRACE(_T("\t Found network identifier: %s\n"), pIRCCon->strNetwork.c_str());
+ TRACE(L"\t Found network identifier: %s\n", pIRCCon->strNetwork.c_str());
return 0;
}
}
@@ -1149,8 +1149,8 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
if (pos != tstring::npos)
strChannel = strChannel.substr(0, pos - 1);
else {
- if (mir_tstrcmpi(gcd->ptszID, _T("Network log")))
- TRACE(_T("\t WARNING: ignoring unknown event!\n"));
+ if (mir_tstrcmpi(gcd->ptszID, L"Network log"))
+ TRACE(L"\t WARNING: ignoring unknown event!\n");
return 0;
}
pHistory = CAppletManager::GetInstance()->GetIRCHistoryByName(pIRCCon->strProtocol, strChannel);
@@ -1165,7 +1165,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
Event.hContact = pHistory->hContact;
}
else if (gcd->iType != GC_EVENT_INFORMATION) {
- TRACE(_T("\t WARNING: ignoring unknown event!\n"));
+ TRACE(L"\t WARNING: ignoring unknown event!\n");
return 0;
}
else
@@ -1176,7 +1176,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
if (gcd->iType == GC_EVENT_JOIN && pHistory)
pHistory->LUsers.push_back(toTstring(gce->ptszNick));
- TRACE(_T("\t Chatroom is hidden, skipping event!\n"));
+ TRACE(L"\t Chatroom is hidden, skipping event!\n");
return 0;
}
@@ -1185,17 +1185,17 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
tstring strStatus = toTstring(gce->ptszStatus);
if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strNick.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
- strNick = strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("...");
+ strNick = strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"...";
- TRACE(_T("\t Handling event...\t"));
+ TRACE(L"\t Handling event...\t");
switch (gcd->iType) {
case GC_EVENT_INFORMATION:
if (CConfig::GetBoolSetting(NOTIFY_IRC_CHANNEL))
Event.bNotification = true;
- if (strText.find(_T("CTCP")) == 0)
- Event.strValue = _T("--> ") + strText;
+ if (strText.find(L"CTCP") == 0)
+ Event.strValue = L"--> " + strText;
else
Event.strValue = strText;
@@ -1203,12 +1203,12 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
case GC_EVENT_ACTION:
if (CConfig::GetBoolSetting(NOTIFY_IRC_EMOTES))
Event.bNotification = true;
- Event.strValue = strNick + _T(" ") + strText;
+ Event.strValue = strNick + L" " + strText;
break;
case GC_EVENT_MESSAGE:
if (CConfig::GetBoolSetting(NOTIFY_IRC_MESSAGES))
Event.bNotification = true;
- Event.strValue = strNick + _T(": ") + strText;
+ Event.strValue = strNick + L": " + strText;
break;
case GC_EVENT_JOIN:
// Add the user to the list
@@ -1219,7 +1219,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
// Skip join event for user
if (gce->bIsMe)
return 0;
- Event.strValue = TranslateString(_T("%s has joined the channel"), strNick.c_str());
+ Event.strValue = TranslateString(L"%s has joined the channel", strNick.c_str());
break;
case GC_EVENT_PART:
@@ -1227,7 +1227,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
if (CConfig::GetBoolSetting(NOTIFY_IRC_USERS))
Event.bNotification = true;
tstring strFullNick = toTstring(gce->ptszNick);
- Event.strValue = TranslateString(strText.empty() ? _T("%s has left") : _T("%s has left: %s"), strNick.c_str(), strText.c_str());
+ Event.strValue = TranslateString(strText.empty() ? L"%s has left" : L"%s has left: %s", strNick.c_str(), strText.c_str());
if (pHistory) {
// Remove the user from the list
list<tstring>::iterator iter = pHistory->LUsers.begin();
@@ -1244,12 +1244,12 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
case GC_EVENT_QUIT:
if (CConfig::GetBoolSetting(NOTIFY_IRC_USERS))
Event.bNotification = true;
- Event.strValue = TranslateString(strText.empty() ? _T("%s has disconnected") : _T("%s has disconnected: %s"), strNick.c_str(), strText.c_str());
+ Event.strValue = TranslateString(strText.empty() ? L"%s has disconnected" : L"%s has disconnected: %s", strNick.c_str(), strText.c_str());
break;
case GC_EVENT_KICK:
if (CConfig::GetBoolSetting(NOTIFY_IRC_USERS))
Event.bNotification = true;
- Event.strValue = TranslateString(_T("%s has kicked %s: %s"), strStatus.c_str(), strNick.c_str(), strText.c_str());
+ Event.strValue = TranslateString(L"%s has kicked %s: %s", strStatus.c_str(), strNick.c_str(), strText.c_str());
break;
case GC_EVENT_NICK:
{
@@ -1258,9 +1258,9 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
tstring strFullNick = toTstring(gce->ptszNick);
if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strText.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
- strText = strText.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("...");
+ strText = strText.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"...";
- Event.strValue = TranslateString(_T("%s is now known as %s"), strNick.c_str(), strText.c_str());
+ Event.strValue = TranslateString(L"%s is now known as %s", strNick.c_str(), strText.c_str());
if (pHistory) {
// change the nick in the userlist
list<tstring>::iterator iter = pHistory->LUsers.begin();
@@ -1275,12 +1275,12 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
case GC_EVENT_NOTICE:
if (CConfig::GetBoolSetting(NOTIFY_IRC_NOTICES))
Event.bNotification = true;
- Event.strValue = TranslateString(_T("Notice from %s: %s"), strNick.c_str(), strText.c_str());
+ Event.strValue = TranslateString(L"Notice from %s: %s", strNick.c_str(), strText.c_str());
break;
case GC_EVENT_TOPIC:
if (CConfig::GetBoolSetting(NOTIFY_IRC_CHANNEL))
Event.bNotification = true;
- Event.strValue = TranslateString(_T("Topic is now '%s' (set by %s)"), strText.c_str(), strNick.c_str());
+ Event.strValue = TranslateString(L"Topic is now '%s' (set by %s)", strText.c_str(), strNick.c_str());
break;
case GC_EVENT_ADDSTATUS:
{
@@ -1288,9 +1288,9 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
Event.bNotification = true;
tstring strNick2 = toTstring(gce->ptszStatus);
if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strNick2.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
- strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("...");
+ strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"...";
- Event.strValue = TranslateString(_T("%s enables '%s' for %s"), strText.c_str(), strNick2.c_str(), strNick.c_str());
+ Event.strValue = TranslateString(L"%s enables '%s' for %s", strText.c_str(), strNick2.c_str(), strNick.c_str());
break;
}
case GC_EVENT_REMOVESTATUS:
@@ -1299,13 +1299,13 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
Event.bNotification = true;
tstring strNick2 = toTstring(gce->ptszStatus);
if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strNick2.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
- strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("...");
+ strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"...";
- Event.strValue = TranslateString(_T("%s disables '%s' for %s"), strText.c_str(), strNick2.c_str(), strNick.c_str());
+ Event.strValue = TranslateString(L"%s disables '%s' for %s", strText.c_str(), strNick2.c_str(), strNick.c_str());
break;
}
default:
- TRACE(_T("OK!\n"));
+ TRACE(L"OK!\n");
return 0;
}
if (gce->bIsMe || gcd->ptszID == NULL)
@@ -1348,8 +1348,8 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
Event.hContact = (*iter)->hContact;
tstring strName = CAppletManager::GetContactDisplayname((*iter)->hContact, true);
- Event.strDescription = strName + _T(" - ") + Event.strValue;
- Event.strSummary = _T("(") + toTstring(gcd->pszModule) + _T(") ") + strName;
+ Event.strDescription = strName + L" - " + Event.strValue;
+ Event.strSummary = L"(" + toTstring(gcd->pszModule) + L") " + strName;
CAppletManager::GetInstance()->HandleEvent(&Event);
break;
}
@@ -1358,26 +1358,26 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam)
iter++;
}
}
- TRACE(_T("OK!\n"));
+ TRACE(L"OK!\n");
return 0;
}
else if (gcd->ptszID != NULL) {
- TRACE(_T("OK!\n"));
+ TRACE(L"OK!\n");
return 0;
}
if (pHistory) {
tstring strChannel = pHistory->strChannel;
if (CConfig::GetBoolSetting(NOTIFY_CHANNELCUTOFF) && strChannel.length() > CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) {
- strChannel = strChannel.erase(CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) + _T("...");
+ strChannel = strChannel.erase(CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) + L"...";
}
- Event.strDescription = strChannel + _T(" - ") + Event.strValue;
- Event.strSummary = _T("(") + toTstring(gcd->pszModule) + _T(") ") + pHistory->strChannel;
+ Event.strDescription = strChannel + L" - " + Event.strValue;
+ Event.strSummary = L"(" + toTstring(gcd->pszModule) + L") " + pHistory->strChannel;
}
else
Event.strDescription = Event.strValue;
- TRACE(_T("OK!\n"));
+ TRACE(L"OK!\n");
CAppletManager::GetInstance()->HandleEvent(&Event);
@@ -1475,7 +1475,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
Event.eType = EVENT_SIGNED_ON;
if (pIRCCon && db_get_b(Event.hContact, szProto, "ChatRoom", 0) != 0) {
- Event.strDescription = TranslateString(_T("Joined %s"), strName.c_str());
+ Event.strDescription = TranslateString(L"Joined %s", strName.c_str());
DBVARIANT dbv;
if (db_get_ts(Event.hContact, szProto, "Nick", &dbv))
@@ -1484,7 +1484,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
db_free(&dbv);
}
else
- Event.strDescription = TranslateString(_T("%s signed on (%s)"), strName.c_str(), Event.strValue.c_str());
+ Event.strDescription = TranslateString(L"%s signed on (%s)", strName.c_str(), Event.strValue.c_str());
}
// Contact signed off
else if (iStatus == ID_STATUS_OFFLINE && iOldStatus != ID_STATUS_OFFLINE) {
@@ -1493,12 +1493,12 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
Event.eType = EVENT_SIGNED_OFF;
if (pIRCCon && db_get_b(Event.hContact, szProto, "ChatRoom", 0) != 0) {
- Event.strDescription = TranslateString(_T("Left %s"), strName.c_str());
+ Event.strDescription = TranslateString(L"Left %s", strName.c_str());
// delete IRC-Channel history
CAppletManager::GetInstance()->DeleteIRCHistory(Event.hContact);
}
else
- Event.strDescription = TranslateString(_T("%s signed off"), strName.c_str());
+ Event.strDescription = TranslateString(L"%s signed off", strName.c_str());
}
// Contact changed status
else if (iStatus != iOldStatus) {
@@ -1506,18 +1506,18 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
Event.bNotification = true;
Event.eType = EVENT_STATUS;
- Event.strDescription = TranslateString(_T("%s is now %s"), strName.c_str(), Event.strValue.c_str());
+ Event.strDescription = TranslateString(L"%s is now %s", strName.c_str(), Event.strValue.c_str());
}
// ignore remaining events
else
return 0;
if (CConfig::GetBoolSetting(NOTIFY_SHOWPROTO))
- Event.strDescription = _T("(") + strProto + _T(") ") + Event.strDescription;
+ Event.strDescription = L"(" + strProto + L") " + Event.strDescription;
- Event.strSummary = TranslateString(_T("Contactlist event"));
+ Event.strSummary = TranslateString(L"Contactlist event");
// Block notifications after connecting/disconnecting
if (pProtocolData->iStatus == ID_STATUS_OFFLINE || (DWORD)pProtocolData->lTimeStamp + PROTOCOL_NOTIFY_DELAY > GetTickCount())
@@ -1554,7 +1554,7 @@ int CAppletManager::HookProtoAck(WPARAM, LPARAM lParam)
if (pAck->lParam != 0)
Event.strValue = toTstring((char*)pAck->lParam);
else
- Event.strValue = _T("");
+ Event.strValue = L"";
if (Event.iValue == ACKRESULT_SUCCESS)
CAppletManager::GetInstance()->FinishMessageJob((*iter));
@@ -1576,7 +1576,7 @@ int CAppletManager::HookProtoAck(WPARAM, LPARAM lParam)
tstring strProto = toTstring(pAck->szModule);
// ignore metacontacts status changes
- if (toLower(strProto) == _T("metacontacts"))
+ if (toLower(strProto) == L"metacontacts")
return 0;
CProtocolData *pProtoData = CAppletManager::GetInstance()->GetProtocolData(strProto);
@@ -1610,8 +1610,8 @@ int CAppletManager::HookProtoAck(WPARAM, LPARAM lParam)
// set the event description / summary
tstring strStatus = toTstring(pcli->pfnGetStatusModeDescription(iNewStatus, 0));
- Event.strDescription = _T("(") + Event.strValue + _T(") ") + TranslateString(_T("You are now %s"), strStatus.c_str());
- Event.strSummary = TranslateString(_T("Protocol status change"));
+ Event.strDescription = L"(" + Event.strValue + L") " + TranslateString(L"You are now %s", strStatus.c_str());
+ Event.strSummary = TranslateString(L"Protocol status change");
if (Event.eType != EVENT_PROTO_STATUS)
pProtoData->lTimeStamp = GetTickCount();
@@ -1649,7 +1649,7 @@ int CAppletManager::HookContactDeleted(WPARAM wParam, LPARAM)
tstring strName = CAppletManager::GetContactDisplayname(Event.hContact, true);
- Event.strDescription = TranslateString(_T("%s was deleted from contactlist!"), strName.c_str());
+ Event.strDescription = TranslateString(L"%s was deleted from contactlist!", strName.c_str());
CAppletManager::GetInstance()->HandleEvent(&Event);
return 0;