From 8ae3679aa1339ce9abee53adb69902bd6b7513dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jul 2016 10:31:04 +0000 Subject: hello, Unix. phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewAwaySysMod/src/AwayOpt.cpp | 16 +++++++-------- plugins/NewAwaySysMod/src/AwaySys.cpp | 20 +++++++++---------- plugins/NewAwaySysMod/src/Client.cpp | 8 ++++---- plugins/NewAwaySysMod/src/ContactList.cpp | 6 +++--- plugins/NewAwaySysMod/src/MsgTree.cpp | 14 ++++++------- plugins/NewAwaySysMod/src/Notification.cpp | 4 ++-- plugins/NewAwaySysMod/src/Options.cpp | 4 ++-- plugins/NewAwaySysMod/src/Options.h | 2 +- plugins/NewAwaySysMod/src/Properties.cpp | 10 +++++----- plugins/NewAwaySysMod/src/SetAwayMsg.cpp | 32 +++++++++++++++--------------- plugins/NewAwaySysMod/src/stdafx.h | 24 +++++++++++----------- 11 files changed, 70 insertions(+), 70 deletions(-) (limited to 'plugins/NewAwaySysMod/src') diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index 33f9bc22ee..dff4fa7a04 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -34,7 +34,7 @@ CIconList g_IconList; // Set window size and center its controls void MySetPos(HWND hwndParent) { - HWND hWndTab = FindWindowEx(GetParent(hwndParent), NULL, _T("SysTabControl32"), _T("")); + HWND hWndTab = FindWindowEx(GetParent(hwndParent), NULL, L"SysTabControl32", L""); if (!hWndTab) { _ASSERT(0); return; @@ -201,10 +201,10 @@ static INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LP ChangeLock++; if (!(pnm->ItemNew->Flags & TIF_ROOTITEM)) { SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, pnm->ItemNew->Title); - SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? _T("") : ((CTreeItem*)pnm->ItemNew)->User_Str1); + SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? L"" : ((CTreeItem*)pnm->ItemNew)->User_Str1); } else { - SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, _T("")); + SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, L""); if (pnm->ItemNew->ID == g_Messages_RecentRootID) SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, TranslateT("Your most recent status messages are placed in this category. It's not recommended that you put your messages manually here, as they'll be replaced by your recent messages.")); else { @@ -519,8 +519,8 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int Meaning; } static IdleComboValues[] = { - _T("Windows"), AUTOREPLY_IDLE_WINDOWS, - _T("Miranda"), AUTOREPLY_IDLE_MIRANDA + L"Windows", AUTOREPLY_IDLE_WINDOWS, + L"Miranda", AUTOREPLY_IDLE_MIRANDA }; for (int i = 0; i < _countof(IdleComboValues); i++) @@ -552,7 +552,7 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l IDC_MOREOPTDLG_EVNTURL, LPGENT("URL"), IDC_MOREOPTDLG_EVNTFILE, LPGENT("File") }; - hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP | TTS_NOPREFIX, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL); + hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP | TTS_NOPREFIX, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL); TOOLINFO ti = { 0 }; ti.cbSize = sizeof(ti); ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; @@ -756,10 +756,10 @@ INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ChangeLock++; if (!(pnm->ItemNew->Flags & TIF_ROOTITEM)) { SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, pnm->ItemNew->Title); - SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? _T("") : ((CTreeItem*)pnm->ItemNew)->User_Str1); + SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? L"" : ((CTreeItem*)pnm->ItemNew)->User_Str1); } else { - SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, _T("")); + SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, L""); if (pnm->ItemNew->ID == g_Messages_RecentRootID) SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, TranslateT("Your most recent status messages are placed in this category. It's not recommended that you put your messages manually here, as they'll be replaced by your recent messages.")); else { diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index daf06ea463..f5f291c59b 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -162,7 +162,7 @@ int StatusMsgReq(WPARAM wParam, LPARAM lParam, CString &szProto) return 0; } if (CContactSettings(iMode, hContactForSettings).Ignore) { - CallAllowedPS_SETAWAYMSG(szProto, iMode, _T("")); // currently NULL makes ICQ to ignore _any_ further status message requests until the next PS_SETAWAYMSG, so i can't use it here.. + CallAllowedPS_SETAWAYMSG(szProto, iMode, L""); // currently NULL makes ICQ to ignore _any_ further status message requests until the next PS_SETAWAYMSG, so i can't use it here.. return 0; // move along, sir } @@ -288,7 +288,7 @@ int CSStatusChange(WPARAM wParam, LPARAM lParam) // CommonStatus plugins (Startu for (int i = 0; i < lParam; i++) { LogMessage("%d: cbSize=%d, szProto=%s, status=%d, lastStatus=%d, szMsg:", - i + 1, ps[i]->cbSize, ps[i]->szName ? (char*)ps[i]->szName : "NULL", ps[i]->status, ps[i]->lastStatus, ps[i]->szMsg ? ps[i]->szMsg : _T("NULL")); + i + 1, ps[i]->cbSize, ps[i]->szName ? (char*)ps[i]->szName : "NULL", ps[i]->status, ps[i]->lastStatus, ps[i]->szMsg ? ps[i]->szMsg : L"NULL"); if (ps[i]->status != ID_STATUS_DISABLED) { if (ps[i]->status != ID_STATUS_CURRENT) g_ProtoStates[ps[i]->szName].m_status = (ps[i]->status == ID_STATUS_LAST) ? ps[i]->lastStatus : ps[i]->status; @@ -489,7 +489,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) ai->flags = AIF_DONTPARSE; TCString Result; if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) { - GetTimeFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].m_awaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : _T("H:mm"), Result.GetBuffer(256), 256); + GetTimeFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].m_awaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : L"H:mm", Result.GetBuffer(256), 256); Result.ReleaseBuffer(); } else if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) { @@ -510,11 +510,11 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) Result = TranslateT("Stranger"); } else if (!mir_tstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) { - mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_REQUESTCOUNT, 0)); + mir_sntprintf(Result.GetBuffer(16), 16, L"%d", db_get_w(ai->fi->hContact, MOD_NAME, DB_REQUESTCOUNT, 0)); Result.ReleaseBuffer(); } else if (!mir_tstrcmp(ai->targv[0], VAR_MESSAGENUM)) { - mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_MESSAGECOUNT, 0)); + mir_sntprintf(Result.GetBuffer(16), 16, L"%d", db_get_w(ai->fi->hContact, MOD_NAME, DB_MESSAGECOUNT, 0)); Result.ReleaseBuffer(); } else if (!mir_tstrcmp(ai->targv[0], VAR_TIMEPASSED)) { @@ -566,7 +566,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (!szResult) return NULL; - mir_tstrcpy(szResult, (Result != NULL) ? Result : _T("")); + mir_tstrcpy(szResult, (Result != NULL) ? Result : L""); return (INT_PTR)szResult; } @@ -726,13 +726,13 @@ extern "C" int __declspec(dllexport) Load(void) InitOptions(); // must be called before we hook CallService if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) { // change all %nas_message% variables to %extratext% if it wasn't done before - TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", _T("")); + TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", L""); if (Str.GetLen()) - db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(_T("nas_message"), _T("extratext"))); + db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(L"nas_message", L"extratext")); - Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", _T("")); + Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", L""); if (Str.GetLen()) - db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(_T("nas_message"), _T("extratext"))); + db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(L"nas_message", L"extratext")); } if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 2) { // disable autoreply for not-on-list contacts, as such contact may be a spam bot db_set_b(NULL, MOD_NAME, ContactStatusToDBSetting(0, DB_ENABLEREPLY, 0, INVALID_CONTACT_ID), 0); diff --git a/plugins/NewAwaySysMod/src/Client.cpp b/plugins/NewAwaySysMod/src/Client.cpp index c08508db61..84c365fbb2 100644 --- a/plugins/NewAwaySysMod/src/Client.cpp +++ b/plugins/NewAwaySysMod/src/Client.cpp @@ -171,23 +171,23 @@ int ICQStatusToGeneralStatus(int bICQStat) TCString VariablesEscape(TCString Str) { if (!Str.GetLen()) { - return _T(""); + return L""; } enum eState { ST_TEXT, ST_QUOTE }; eState State = ST_QUOTE; - TCString Result(_T("`")); + TCString Result(L"`"); const TCHAR *p = Str; while (*p) { if (*p == '`') { if (State == ST_TEXT) { - Result += _T("````"); + Result += L"````"; State = ST_QUOTE; } else { - Result += _T("``"); + Result += L"``"; } } else { diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index ce2d3f9a03..1f7d3dd17d 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -367,7 +367,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact) TVINSERTSTRUCT tvIns; memset(&tvIns, 0, sizeof(tvIns)); - tvIns.hParent = AddGroup(db_get_s(hContact, "CList", "Group", _T(""))); + tvIns.hParent = AddGroup(db_get_s(hContact, "CList", "Group", L"")); tvIns.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0); tvIns.hInsertAfter = TVI_ROOT; tvIns.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; @@ -379,7 +379,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact) // adds a new group if it doesn't exist yet; returns its hItem HTREEITEM CCList::AddGroup(TCString GroupName) { - if (GroupName == _T("")) + if (GroupName == L"") return TVI_ROOT; MGROUP hGroupId = Clist_GroupExists(GroupName); @@ -395,7 +395,7 @@ HTREEITEM CCList::AddGroup(TCString GroupName) tvIns.hParent = TVI_ROOT; tvIns.item.pszText = _tcsrchr(GroupName, '\\'); if (tvIns.item.pszText) { - TCString ParentGroupName(_T("")); + TCString ParentGroupName(L""); tvIns.hParent = AddGroup(ParentGroupName.DiffCat(GroupName, tvIns.item.pszText)); tvIns.item.pszText++; } diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp index 0cb9c2674c..60ec54710c 100644 --- a/plugins/NewAwaySysMod/src/MsgTree.cpp +++ b/plugins/NewAwaySysMod/src/MsgTree.cpp @@ -272,7 +272,7 @@ LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM } while (hCurWnd && !GetWindowText(hCurWnd, WndTitle, 256)); WndTitle.ReleaseBuffer(); } - if (!m_bModified || MessageBox(GetParent(hWnd), TCString(TranslateT("You've made changes to multiple message trees at a time.\r\nDo you want to leave changes in \"")) + WndTitle + TranslateT("\" dialog?\r\nPress Yes to leave changes in this dialog, or No to discard its changes and save changes of the other message tree instead."), WndTitle + _T(" - ") + TranslateT("New Away System"), MB_ICONQUESTION | MB_YESNO) == IDNO) { + if (!m_bModified || MessageBox(GetParent(hWnd), TCString(TranslateT("You've made changes to multiple message trees at a time.\r\nDo you want to leave changes in \"")) + WndTitle + TranslateT("\" dialog?\r\nPress Yes to leave changes in this dialog, or No to discard its changes and save changes of the other message tree instead."), WndTitle + L" - " + TranslateT("New Away System"), MB_ICONQUESTION | MB_YESNO) == IDNO) { COptItem_TreeCtrl *TreeCtrl = dat->GetTreeCtrl(); TCString OldTitle, OldMsg, NewTitle, NewMsg; int OldOrder = TreeCtrl->IDToOrder(TreeCtrl->GetSelectedItemID(GetParent(hWnd))); @@ -294,13 +294,13 @@ LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM NewMsg = ((CTreeItem*)nm.ItemNew)->User_Str1; } if (OldTitle.IsEmpty()) - OldTitle = _T(""); // to be sure that NULL will be equal to "" in the latter comparisons + OldTitle = L""; // to be sure that NULL will be equal to "" in the latter comparisons if (OldMsg.IsEmpty()) - OldMsg = _T(""); + OldMsg = L""; if (NewTitle.IsEmpty()) - NewTitle = _T(""); + NewTitle = L""; if (NewMsg.IsEmpty()) - NewMsg = _T(""); + NewMsg = L""; if (OldTitle != (const TCHAR*)NewTitle || OldMsg != (const TCHAR*)NewMsg) { // probably it's better to leave nm.ItemOld = NULL, to prevent accidental rewriting of it with old data from an edit control etc. @@ -616,7 +616,7 @@ bool CMsgTree::DeleteSelectedItem() // returns true if the item was deleted CTreeItem* CMsgTree::AddCategory() { COptItem_TreeCtrl *TreeCtrl = GetTreeCtrl(); - CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(_T(""), 0, 0, TIF_GROUP)); + CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(L"", 0, 0, TIF_GROUP)); TVITEM tvi; tvi.mask = TVIF_HANDLE | TVIF_TEXT; tvi.hItem = TreeItem->hItem; @@ -635,7 +635,7 @@ CTreeItem* CMsgTree::AddCategory() CTreeItem* CMsgTree::AddMessage() { COptItem_TreeCtrl *TreeCtrl = GetTreeCtrl(); - CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(_T(""), 0, 0)); + CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(L"", 0, 0)); TVITEM tvi; tvi.mask = TVIF_HANDLE | TVIF_TEXT; tvi.hItem = TreeItem->hItem; diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp index 66f7160ccf..fdf0b5ebe0 100644 --- a/plugins/NewAwaySysMod/src/Notification.cpp +++ b/plugins/NewAwaySysMod/src/Notification.cpp @@ -53,7 +53,7 @@ static int CALLBACK MenuWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar static VOID CALLBACK ShowContactMenu(MCONTACT hContact) { POINT pt; - HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL); + HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _T(MOD_NAME)L"_MenuWindow", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL); SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG_PTR)MenuWndProc); HMENU hMenu = Menu_BuildContactMenu(hContact); GetCursorPos(&pt); @@ -66,7 +66,7 @@ static VOID CALLBACK ShowContactMenu(MCONTACT hContact) void ShowLog(TCString &LogFilePath) { - INT_PTR Result = (INT_PTR)ShellExecute(NULL, _T("open"), LogFilePath, NULL, NULL, SW_SHOW); + INT_PTR Result = (INT_PTR)ShellExecute(NULL, L"open", LogFilePath, NULL, NULL, SW_SHOW); if (Result <= 32) { TCHAR szError[64]; mir_sntprintf(szError, TranslateT("Error #%d"), Result); diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp index c6209078f9..aea2556676 100644 --- a/plugins/NewAwaySysMod/src/Options.cpp +++ b/plugins/NewAwaySysMod/src/Options.cpp @@ -283,7 +283,7 @@ int TreeReadEnum(const char *szSetting, LPARAM lParam) pItem.ParentID = ParentID; pItem.Flags = Flags; pItem.hItem = NULL; - pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, _T("")); + pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L""); pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == NULL) ? NULL : db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + (szSetting + Len), (TCHAR*)NULL); @@ -660,7 +660,7 @@ int ListReadEnum(const char *szSetting, LPARAM lParam) int Len = pData->sDBSettingPrefix.GetLen() + pData->ListCtrl->sDBSetting.GetLen() + _countof(LISTITEM_DBSTR_TEXT) - 1; if (!strncmp(szSetting, pData->sDBSettingPrefix + pData->ListCtrl->sDBSetting + LISTITEM_DBSTR_TEXT, Len) && isdigit(szSetting[Len])) { int ID = atol(szSetting + Len); - pData->ListCtrl->m_value.SetAtGrow(ID).Text = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, _T("")); + pData->ListCtrl->m_value.SetAtGrow(ID).Text = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L""); } return 0; } diff --git a/plugins/NewAwaySysMod/src/Options.h b/plugins/NewAwaySysMod/src/Options.h index 4e4481da8b..b22a0b902b 100644 --- a/plugins/NewAwaySysMod/src/Options.h +++ b/plugins/NewAwaySysMod/src/Options.h @@ -406,7 +406,7 @@ public: { if (TreeFlags & TREECTRL_FLAG_IS_SINGLE_LEVEL) { _ASSERT(!RootItems.GetSize()); // there can't be any root items when the tree is a plain list - this->RootItems.AddElem(CTreeRootItem(_T(""), 0, TIF_EXPANDED)); // TODO?? + this->RootItems.AddElem(CTreeRootItem(L"", 0, TIF_EXPANDED)); // TODO?? this->RootItems[0].hItem = TVI_ROOT; } } diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp index 59ffb1fca7..8056306df5 100644 --- a/plugins/NewAwaySysMod/src/Properties.cpp +++ b/plugins/NewAwaySysMod/src/Properties.cpp @@ -188,7 +188,7 @@ void CProtoSettings::SetMsgFormat(int Flags, TCString Message) int i; // try to find an identical message in the same group (to prevent saving multiple identical messages), // or at least if we'll find an identical message somewhere else, then we'll use its title for our new message - TCString Title(_T("")); + TCString Title(L""); for (i = 0; i < TreeCtrl->m_value.GetSize(); i++) { if (!(TreeCtrl->m_value[i].Flags & TIF_GROUP) && TreeCtrl->m_value[i].User_Str1 == (const TCHAR*)Message) { if (TreeCtrl->m_value[i].ParentID == RecentGroupID) { // found it in the same group @@ -204,13 +204,13 @@ void CProtoSettings::SetMsgFormat(int Flags, TCString Message) if (i == TreeCtrl->m_value.GetSize()) { // we didn't find an identical message in the same group, so we'll add our new message here if (Title.IsEmpty()) { // didn't find a title for our message either if (Message.GetLen() > MRM_MAX_GENERATED_TITLE_LEN) - Title = Message.Left(MRM_MAX_GENERATED_TITLE_LEN - 3) + _T("..."); + Title = Message.Left(MRM_MAX_GENERATED_TITLE_LEN - 3) + L"..."; else Title = Message; TCHAR *p = Title.GetBuffer(); while (*p) { // remove "garbage" - if (!(p = _tcspbrk(p, _T("\r\n\t")))) + if (!(p = _tcspbrk(p, L"\r\n\t"))) break; *p++ = ' '; @@ -270,7 +270,7 @@ TCString CProtoSettings::GetMsgFormat(int Flags, int *pOrder) if (Flags & GMF_PROTOORGLOBAL && Message == NULL) { Message = CProtoSettings().GetMsgFormat(GMF_PERSONAL | (Flags & GMF_TEMPORARY), pOrder); - return (Message == NULL) ? _T("") : Message; // global message can't be NULL + return (Message == NULL) ? L"" : Message; // global message can't be NULL } if (Flags & GMF_LASTORDEFAULT && Message == NULL) { // try to get the last or default message, depending on current settings @@ -331,7 +331,7 @@ TCString CProtoSettings::GetMsgFormat(int Flags, int *pOrder) *pOrder = Order; } if (Message == NULL) - Message = _T(""); // last or default message can't be NULL.. otherwise ICQ won't reply to status message requests and won't notify us of status message requests at all + Message = L""; // last or default message can't be NULL.. otherwise ICQ won't reply to status message requests and won't notify us of status message requests at all } return Message; } diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 87d0a4f376..6d124b2157 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -384,7 +384,7 @@ void ApplySelContactsMessage(SetAwayMsgData* dat, CCList *CList, PTREEITEMARRAY } else if (ItemType == MCLCIT_INFO) { char *szProto = (char*)CList->GetItemParam(hItem); - CProtoSettings(szProto).SetMsgFormat(SMF_PERSONAL, (szProto || Message != NULL) ? Message : _T("")); // "szProto || Message != NULL..." means that we'll set an empty message instead of NULL for the global status, if the message is empty (NULL for the global status has a special meaning - SetMsgFormat will set the default message instead of NULL) + CProtoSettings(szProto).SetMsgFormat(SMF_PERSONAL, (szProto || Message != NULL) ? Message : L""); // "szProto || Message != NULL..." means that we'll set an empty message instead of NULL for the global status, if the message is empty (NULL for the global status has a special meaning - SetMsgFormat will set the default message instead of NULL) } else continue; @@ -395,7 +395,7 @@ void ApplySelContactsMessage(SetAwayMsgData* dat, CCList *CList, PTREEITEMARRAY if (dat->hInitContact) CContactSettings(0, dat->hInitContact).SetMsgFormat(SMF_PERSONAL, Message); else - CProtoSettings(dat->szProtocol).SetMsgFormat(SMF_PERSONAL, (dat->szProtocol || Message != NULL) ? Message : _T("")); + CProtoSettings(dat->szProtocol).SetMsgFormat(SMF_PERSONAL, (dat->szProtocol || Message != NULL) ? Message : L""); } SendDlgItemMessage(hwndDlg, IDC_SAWAYMSG_MSGDATA, EM_SETMODIFY, false, 0); SetDlgItemText(hwndDlg, IDC_OK, TranslateT("OK")); @@ -603,7 +603,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA // init tooltips TOOLINFO ti = { 0 }; - hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL); + hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL); ti.cbSize = sizeof(ti); ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; for (int i = 0; i < _countof(Tooltips); i++) { @@ -723,12 +723,12 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (!MessageDetermined) { TCString CurMessage((ItemType == MCLCIT_CONTACT) ? CContactSettings(0, hContact).GetMsgFormat(GMF_PERSONAL) : CProtoSettings(szProto).GetMsgFormat(GMF_TEMPORARY | GMF_PERSONAL)); if (CurMessage == NULL) - CurMessage = _T(""); + CurMessage = L""; if (Message == NULL) Message = CurMessage; else if (CurMessage != (const TCHAR*)Message) { - Message = _T(""); + Message = L""; BtnTitle = TranslateT("Apply"); MessageDetermined = true; } @@ -750,11 +750,11 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA } if (!bLeaveOldMessage) - SetDlgItemText(hwndDlg, IDC_SAWAYMSG_MSGDATA, (Message == NULL) ? _T("") : Message); + SetDlgItemText(hwndDlg, IDC_SAWAYMSG_MSGDATA, (Message == NULL) ? L"" : Message); SetDlgItemText(hwndDlg, IDC_OK, BtnTitle); TCString WindowTitle(TranslateT("Set message for")); - WindowTitle += _T(" \""); + WindowTitle += L" \""; WindowTitle += Status ? pcli->pfnGetStatusModeDescription(Status, 0) : TranslateT("Statuses"); if (nNewContacts == 1) { WindowTitle += TCString(TranslateT("\" (")); @@ -782,34 +782,34 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (hContact) { if (IsAnICQProto(GetContactProto(hContact))) { WindowTitle += TranslateT("message for"); - WindowTitle += _T(" "); + WindowTitle += L" "; } else { WindowTitle += TranslateT("for"); - WindowTitle += _T(" "); + WindowTitle += L" "; } WindowTitle += pcli->pfnGetContactDisplayName(hContact, 0); if (!IsAnICQProto(GetContactProto(hContact))) { - WindowTitle += _T(" "); + WindowTitle += L" "; WindowTitle += TranslateT("available autoreply only"); - WindowTitle += _T(")"); + WindowTitle += L")"; } - else WindowTitle += _T(")"); + else WindowTitle += L")"; } else { if (!szProto) { WindowTitle += TranslateT("all accounts"); - WindowTitle += _T(")"); + WindowTitle += L")"; } else { PROTOACCOUNT *acc = Proto_GetAccount(szProto); WindowTitle += acc->tszAccountName; - WindowTitle += _T(")"); + WindowTitle += L")"; } } } - else WindowTitle += _T("\""); + else WindowTitle += L"\""; SetWindowText(hwndDlg, WindowTitle); } @@ -872,7 +872,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA // don't forget to change Recent Message Save loop in the UM_SAM_APPLYANDCLOSE if you're changing something here if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) { PROTOACCOUNT * acc = Proto_GetAccount(p->szModuleName); - hItem = CList->AddInfo(TCString(_T("* ")) + acc->tszAccountName + _T(" *"), CLC_ROOT, hItem, (LPARAM)p->szModuleName, Skin_LoadProtoIcon(p->szModuleName, g_ProtoStates[p->szModuleName].m_status)); + hItem = CList->AddInfo(TCString(L"* ") + acc->tszAccountName + L" *", CLC_ROOT, hItem, (LPARAM)p->szModuleName, Skin_LoadProtoIcon(p->szModuleName, g_ProtoStates[p->szModuleName].m_status)); if (dat->szProtocol && !mir_strcmp(p->szModuleName, dat->szProtocol)) hSelItem = hItem; } diff --git a/plugins/NewAwaySysMod/src/stdafx.h b/plugins/NewAwaySysMod/src/stdafx.h index 37a3c6185a..d22135d6a1 100644 --- a/plugins/NewAwaySysMod/src/stdafx.h +++ b/plugins/NewAwaySysMod/src/stdafx.h @@ -76,15 +76,15 @@ #define CBSSTATE_PRESSED 2 #define CBSSTATE_DISABLED 3 -#define VAR_AWAYSINCE_TIME _T("nas_awaysince_time") -#define VAR_AWAYSINCE_DATE _T("nas_awaysince_date") -#define VAR_STATDESC _T("nas_statdesc") -#define VAR_MYNICK _T("nas_mynick") -#define VAR_REQUESTCOUNT _T("nas_requestcount") -#define VAR_MESSAGENUM _T("nas_messagecount") -#define VAR_TIMEPASSED _T("nas_timepassed") -#define VAR_PREDEFINEDMESSAGE _T("nas_predefinedmessage") -#define VAR_PROTOCOL _T("nas_protocol") +#define VAR_AWAYSINCE_TIME L"nas_awaysince_time" +#define VAR_AWAYSINCE_DATE L"nas_awaysince_date" +#define VAR_STATDESC L"nas_statdesc" +#define VAR_MYNICK L"nas_mynick" +#define VAR_REQUESTCOUNT L"nas_requestcount" +#define VAR_MESSAGENUM L"nas_messagecount" +#define VAR_TIMEPASSED L"nas_timepassed" +#define VAR_PREDEFINEDMESSAGE L"nas_predefinedmessage" +#define VAR_PROTOCOL L"nas_protocol" #define SENDSMSG_EVENT_MSG 0x1 #define SENDSMSG_EVENT_URL 0x2 @@ -180,7 +180,7 @@ #define DB_SENDCOUNT "SendCount" #define MESSAGES_DB_MSGTREEDEF "MsgTreeDef" -#define MSGTREE_RECENT_OTHERGROUP _T("Other") +#define MSGTREE_RECENT_OTHERGROUP L"Other" // GetMsgFormat flags #define GMF_PERSONAL 1 // is also used to get global status message, when hContact = NULL (szProto = NULL) @@ -300,7 +300,7 @@ void InitOptions(); // called once when plugin is loaded //int ShowPopupNotification(COptPage &PopupNotifyData, MCONTACT hContact, int iStatusMode); void ShowLog(TCString &LogFilePath); -void ShowMsg(TCHAR *szFirstLine, TCHAR *szSecondLine = _T(""), bool IsErrorMsg = false, int Timeout = 0); +void ShowMsg(TCHAR *szFirstLine, TCHAR *szSecondLine = L"", bool IsErrorMsg = false, int Timeout = 0); #define AWAYSYS_STATUSMSGREQUEST_SOUND "AwaySysStatusMsgRequest" #define ME_AWAYSYS_WORKAROUND "AwaySys/_CallService" @@ -325,7 +325,7 @@ static __inline int LogMessage(const char *Format, ...) __inline int CallAllowedPS_SETAWAYMSG(const char *szProto, int iMode, const TCHAR *szMsg) { // we must use this function everywhere we want to call PS_SETAWAYMSG, otherwise NAS won't allow to change the message! - LogMessage("PS_SETAWAYMSG called by NAS. szProto=%s, Status=%d, Msg:\n%S", szProto, iMode, szMsg ? szMsg : _T("NULL")); + LogMessage("PS_SETAWAYMSG called by NAS. szProto=%s, Status=%d, Msg:\n%S", szProto, iMode, szMsg ? szMsg : L"NULL"); return CallProtoService(szProto, PS_SETAWAYMSG, iMode, (LPARAM)szMsg); } -- cgit v1.2.3