diff options
-rw-r--r-- | plugins/SMS/src/SMSConstans.h | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/dlgboxsubclass.cpp | 20 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/general.cpp | 18 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/options.cpp | 18 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/services.cpp | 20 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smileyroutines.cpp | 6 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smileys.cpp | 93 | ||||
-rw-r--r-- | plugins/SpellChecker/src/dictionary.cpp | 38 | ||||
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 12 | ||||
-rw-r--r-- | plugins/SplashScreen/src/debug.h | 6 | ||||
-rw-r--r-- | plugins/SplashScreen/src/options.cpp | 22 | ||||
-rw-r--r-- | plugins/SplashScreen/src/services.cpp | 6 | ||||
-rw-r--r-- | plugins/SplashScreen/src/splash.cpp | 38 |
14 files changed, 151 insertions, 152 deletions
diff --git a/plugins/SMS/src/SMSConstans.h b/plugins/SMS/src/SMSConstans.h index 2642a56c7d..3b35bd0d04 100644 --- a/plugins/SMS/src/SMSConstans.h +++ b/plugins/SMS/src/SMSConstans.h @@ -63,7 +63,7 @@ struct FontOptionsList }
static fontOptionsList[] = {
- { RGB(106, 106, 106), _T("Arial"), 0, -12},
+ { RGB(106, 106, 106), L"Arial", 0, -12},
};
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 1970577b48..31ccc22f6d 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -158,27 +158,27 @@ public: //identifies the message dialog
bool IsMessageSendDialog(HWND hwnd)
{
- TCHAR szClassName[32] = _T("");
+ TCHAR szClassName[32] = L"";
GetClassName(hwnd, szClassName, SIZEOF(szClassName));
- if (_tcscmp(szClassName, _T("#32770"))) return false;
+ if (_tcscmp(szClassName, L"#32770")) return false;
if ((REdit = GetDlgItem(hwnd, MI_IDC_LOG)) != NULL)
{
GetClassName(REdit, szClassName, SIZEOF(szClassName));
- if (_tcscmp(szClassName, _T("RichEdit20A")) != 0 &&
- _tcscmp(szClassName, _T("RichEdit20W")) != 0 &&
- _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false;
+ if (_tcscmp(szClassName, L"RichEdit20A") != 0 &&
+ _tcscmp(szClassName, L"RichEdit20W") != 0 &&
+ _tcscmp(szClassName, L"RICHEDIT50W") != 0) return false;
}
else return false;
if ((MEdit = GetDlgItem(hwnd, MI_IDC_MESSAGE)) != NULL)
{
GetClassName(MEdit, szClassName, SIZEOF(szClassName));
- if (_tcscmp(szClassName, _T("Edit")) != 0 &&
- _tcscmp(szClassName, _T("RichEdit20A")) != 0 &&
- _tcscmp(szClassName, _T("RichEdit20W")) != 0 &&
- _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false;
+ if (_tcscmp(szClassName, L"Edit") != 0 &&
+ _tcscmp(szClassName, L"RichEdit20A") != 0 &&
+ _tcscmp(szClassName, L"RichEdit20W") != 0 &&
+ _tcscmp(szClassName, L"RICHEDIT50W") != 0) return false;
}
else return false;
@@ -236,7 +236,7 @@ public: hSmlButton = CreateWindowEx(
WS_EX_LEFT | WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST,
MIRANDABUTTONCLASS,
- _T("S"),
+ L"S",
WS_CHILD|WS_VISIBLE|WS_TABSTOP, // window style
rect.left, // horizontal position of window
rect.top, // vertical position of window
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 8a232a3e23..6810934d11 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -46,7 +46,7 @@ int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf) SelectObject(hcdc, hFont);
SIZE fontSize;
- GetTextExtentPoint32(hcdc, _T(")"), 1, &fontSize);
+ GetTextExtentPoint32(hcdc, L")", 1, &fontSize);
DeleteObject(hFont);
DeleteDC(hcdc);
@@ -78,7 +78,7 @@ HICON GetDefaultIcon(bool copy) const TCHAR* GetImageExt(bkstring &fname)
{
- const TCHAR* ext = _T("");
+ const TCHAR* ext = L"";
int fileId = _topen(fname.c_str(), O_RDONLY | _O_BINARY);
if (fileId != -1)
@@ -89,13 +89,13 @@ const TCHAR* GetImageExt(bkstring &fname) if (bytes > 4)
{
if ( *(unsigned short*)buf == 0xd8ff )
- ext = _T("jpg");
+ ext = L"jpg";
else if ( *(unsigned short*)buf == 0x4d42 )
- ext = _T("bmp");
+ ext = L"bmp";
else if ( *(unsigned*)buf == 0x474e5089 )
- ext = _T("png");
+ ext = L"png";
else if ( *(unsigned*)buf == 0x38464947 )
- ext = _T("gif");
+ ext = L"gif";
}
_close(fileId);
}
@@ -216,8 +216,8 @@ bool InitGdiPlus(void) {
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
- static const TCHAR errmsg[] = _T("GDI+ not installed.\n")
- _T("GDI+ can be downloaded here: http://www.microsoft.com/downloads");
+ static const TCHAR errmsg[] = L"GDI+ not installed.\n"
+ L"GDI+ can be downloaded here: http://www.microsoft.com/downloads";
#ifdef _MSC_VER
__try
@@ -273,7 +273,7 @@ bool IsSmileyProto(char* proto) void ReportError(const TCHAR* errmsg)
{
- static const TCHAR title[] = _T("Miranda SmileyAdd");
+ static const TCHAR title[] = L"Miranda SmileyAdd";
/*
POPUPDATAW pd = {0};
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index 63f6929c6c..d6833684b4 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -100,8 +100,8 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP(&pluginInfoEx);
if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) {
- static const TCHAR errmsg[] = _T("Only one instance of SmileyAdd could be executed.\n")
- _T("Remove duplicate instances from 'Plugins' directory");
+ static const TCHAR errmsg[] = L"Only one instance of SmileyAdd could be executed.\n"
+ L"Remove duplicate instances from 'Plugins' directory";
ReportError(TranslateTS(errmsg));
return 1;
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index b485c5ca99..2ca4e7ed29 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -529,7 +529,7 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) {
OPENFILENAME ofn = {0};
- TCHAR filename[MAX_PATH] = _T("");
+ TCHAR filename[MAX_PATH] = L"";
ofn.lpstrFile = filename;
ofn.nMaxFile = SIZEOF(filename);
@@ -537,7 +537,7 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(item);
if (smc->GetFilename().empty())
{
- pathToAbsolute(_T("Smileys"), inidir);
+ pathToAbsolute(L"Smileys", inidir);
}
else
{
@@ -551,21 +551,21 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) TCHAR filter[512], *pfilter;
_tcscpy(filter, TranslateT("Smiley Packs"));
- lstrcat(filter, _T(" (*.msl;*.asl;*.xep)"));
+ lstrcat(filter, L" (*.msl;*.asl;*.xep)");
pfilter = filter + _tcslen(filter) + 1;
- _tcscpy(pfilter, _T("*.msl;*.asl;*.xep"));
+ _tcscpy(pfilter, L"*.msl;*.asl;*.xep");
pfilter = pfilter + _tcslen(pfilter) + 1;
_tcscpy(pfilter, TranslateT("All Files"));
- lstrcat(pfilter, _T(" (*.*)"));
+ lstrcat(pfilter, L" (*.*)");
pfilter = pfilter + _tcslen(pfilter) + 1;
- _tcscpy(pfilter, _T("*.*"));
+ _tcscpy(pfilter, L"*.*");
pfilter = pfilter + _tcslen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_READONLY |
OFN_EXPLORER | OFN_LONGNAMES | OFN_NOCHANGEDIR;
- ofn.lpstrDefExt = _T("msl");
+ ofn.lpstrDefExt = L"msl";
if (GetOpenFileName(&ofn))
{
@@ -663,7 +663,7 @@ void OptionsType::ReadPackFileName(bkstring& filename, const bkstring& name, const bkstring& defaultFilename)
{
DBVARIANT dbv;
- bkstring settingKey = name + _T("-filename");
+ bkstring settingKey = name + L"-filename";
INT_PTR res = DBGetContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()), &dbv);
if (res == 0)
@@ -678,7 +678,7 @@ void OptionsType::ReadPackFileName(bkstring& filename, const bkstring& name, void OptionsType::WritePackFileName(const bkstring& filename, const bkstring& name)
{
- bkstring settingKey = name + _T("-filename");
+ bkstring settingKey = name + L"-filename";
DBWriteContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()),
filename.c_str());
}
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 58e6c90c97..cfe069f731 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -43,7 +43,7 @@ SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCTyp if (hContact != NULL)
{
opt.ReadContactCategory(hContact, categoryName);
- if (categoryName == _T("<None>")) return NULL;
+ if (categoryName == L"<None>") return NULL;
if (!categoryName.empty() &&
g_SmileyCategories.GetSmileyCategory(categoryName) == NULL)
{
@@ -72,7 +72,7 @@ SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCTyp {
if (proto == NULL || proto[0] == 0)
{
- categoryName = _T("Standard");
+ categoryName = L"Standard";
}
else
{
@@ -80,7 +80,7 @@ SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCTyp if (opt.UseOneForAll)
{
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName);
- if (smc == NULL || smc->IsProto()) categoryName = _T("Standard");
+ if (smc == NULL || smc->IsProto()) categoryName = L"Standard";
}
}
}
@@ -386,7 +386,7 @@ INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam) else
{
bkstring empty;
- if (lParam == 1) empty = _T("<None>");
+ if (lParam == 1) empty = L"<None>";
opt.WriteContactCategory(hContact, empty);
}
NotifyEventHooks(hEvent1, (WPARAM)hContact, 0);
@@ -457,8 +457,8 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) mi.position = 1;
mi.popupPosition = 1;
- mi.ptszName = _T("<None>");
- if (cat == _T("<None>")) {
+ mi.ptszName = L"<None>";
+ if (cat == L"<None>") {
mi.flags |= CMIF_CHECKED;
nonecheck = false;
}
@@ -468,7 +468,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) mi.position = 2;
mi.popupPosition = 2;
- mi.ptszName = _T("Protocol specific");
+ mi.ptszName = LPGENT("Protocol specific");
if (nonecheck) mi.flags |= CMIF_CHECKED; else mi.flags &= ~CMIF_CHECKED;
hMenu = Menu_AddContactMenuItem(&mi);
@@ -523,7 +523,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) case PRAC_ADDED:
if (acc != NULL)
{
- bkstring catname(_T("Standard"));
+ bkstring catname(L"Standard");
const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
g_SmileyCategories.AddAccountAsCategory(acc, defaultFile);
}
@@ -551,7 +551,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) {
if (acc->bIsEnabled)
{
- bkstring catname(_T("Standard"));
+ bkstring catname(L"Standard");
const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
g_SmileyCategories.AddAccountAsCategory(acc, defaultFile);
}
@@ -575,7 +575,7 @@ int DbSettingChanged(WPARAM wParam, LPARAM lParam) if (strcmp(cws->szSetting, "Transport") == 0)
{
- bkstring catname(_T("Standard"));
+ bkstring catname(L"Standard");
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname);
if (smc != NULL)
g_SmileyCategories.AddContactTransportAsCategory(hContact, smc->GetFilename());
diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp index 95a3d77002..98bd40b959 100644 --- a/plugins/SmileyAdd/src/smileyroutines.cpp +++ b/plugins/SmileyAdd/src/smileyroutines.cpp @@ -281,7 +281,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const TCHAR classname[20];
GetClassName(hwnd, classname, SIZEOF(classname));
- bool ishpp = (_tcsncmp(classname, _T("THppRichEdit"), 12) == 0) || fireView;
+ bool ishpp = (_tcsncmp(classname, L"THppRichEdit", 12) == 0) || fireView;
SetRichCallback(hwnd, NULL, false, true);
@@ -526,8 +526,8 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const QueryPerformanceCounter(&end);
unsigned dif = (end.QuadPart - strt.QuadPart)/(freq.QuadPart/1000);
TCHAR mess[300];
- wsprintf(mess, _T("Time elapsed: %u"), dif);
- MessageBox(NULL, mess, _T(""), MB_OK);
+ wsprintf(mess, L"Time elapsed: %u", dif);
+ MessageBox(NULL, mess, L"", MB_OK);
*/
}
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index ef88e952e0..11077b93c6 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -163,7 +163,7 @@ static DWORD_PTR ConvertServiceParam(HANDLE hContact, const TCHAR *param) DWORD_PTR ret;
if (param == NULL)
ret = 0;
- else if (_tcsicmp(_T("hContact"), param) == 0)
+ else if (_tcsicmp(L"hContact", param) == 0)
ret = (DWORD_PTR)hContact;
else if (_istdigit(*param))
ret = _ttoi(param);
@@ -176,7 +176,7 @@ static DWORD_PTR ConvertServiceParam(HANDLE hContact, const TCHAR *param) void SmileyType::CallSmileyService(HANDLE hContact)
{
- _TPattern * srvsplit = _TPattern::compile(_T("(.*)\\|(.*)\\|(.*)"));
+ _TPattern * srvsplit = _TPattern::compile(L"(.*)\\|(.*)\\|(.*)");
_TMatcher * m0 = srvsplit->createTMatcher(GetTriggerText());
m0->findFirstMatch();
@@ -209,13 +209,13 @@ SmileyPackType::~SmileyPackType() }
static const TCHAR urlRegEx[] =
- _T("(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*");
-static const TCHAR pathRegEx[] = _T("[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*");
-static const TCHAR timeRegEx[] = _T("\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}");
+ L"(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*";
+static const TCHAR pathRegEx[] = L"[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*";
+static const TCHAR timeRegEx[] = L"\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}";
void SmileyPackType::AddTriggersToSmileyLookup(void)
{
- _TPattern * p = _TPattern::compile(_T("\\s+"));
+ _TPattern * p = _TPattern::compile(L"\\s+");
{
bkstring emptystr;
@@ -286,8 +286,8 @@ void SmileyPackType::AddTriggersToSmileyLookup(void) void SmileyPackType::ReplaceAllSpecials(const bkstring& Input, bkstring& Output)
{
- Output = _TPattern::replace(_T("%%_{1,2}%%"), Input, _T(" "));
- Output = _TPattern::replace(_T("%%''%%"), Output, _T("\""));
+ Output = _TPattern::replace(L"%%_{1,2}%%", Input, L" ");
+ Output = _TPattern::replace(L"%%''%%", Output, L"\"");
}
@@ -312,7 +312,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo if (filename.empty())
{
- m_Name = _T("Nothing loaded");
+ m_Name = L"Nothing loaded";
return false;
}
@@ -325,14 +325,13 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo {
if (!noerr)
{
- static const TCHAR errmsg[] = _T("Smiley Pack %s not found.\n")
- _T("Select correct Smiley Pack in the Miranda Options | Customize | Smileys.");
+ static const TCHAR errmsg[] = LPGENT("Smiley Pack %s not found.\nSelect correct Smiley Pack in the Miranda Options | Customize | Smileys.");
TCHAR msgtxt[1024];
mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), modpath.c_str());
ReportError(msgtxt);
}
- m_Name = _T("Nothing loaded");
+ m_Name = L"Nothing loaded";
return false;
}
@@ -369,7 +368,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo delete[] buf;
bool res;
- if (filename.find(_T(".xep")) == filename.npos)
+ if (filename.find(L".xep") == filename.npos)
res = LoadSmileyFileMSL(tbuf, onlyInfo, modpath);
else
res = LoadSmileyFileXEP(tbuf, onlyInfo, modpath);
@@ -381,7 +380,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& modpath)
{
- _TPattern * pathsplit = _TPattern::compile(_T("(.*\\\\)(.*)\\.|$"));
+ _TPattern * pathsplit = _TPattern::compile(L"(.*\\\\)(.*)\\.|$");
_TMatcher * m0 = pathsplit->createTMatcher(modpath);
m0->findFirstMatch();
@@ -392,18 +391,18 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& delete pathsplit;
_TPattern * otherf = _TPattern::compile(
- _T("^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\""),
+ L"^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\"",
_TPattern::MULTILINE_MATCHING);
m0 = otherf->createTMatcher(tbuf);
while (m0->findNextMatch())
{
- if (m0->getGroup(1) == _T("Name")) m_Name = m0->getGroup(2);
- if (m0->getGroup(1) == _T("Author")) m_Author = m0->getGroup(2);
- if (m0->getGroup(1) == _T("Date")) m_Date = m0->getGroup(2);
- if (m0->getGroup(1) == _T("Version")) m_Version = m0->getGroup(2);
- if (m0->getGroup(1) == _T("ButtonSmiley")) m_ButtonSmiley = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Name") m_Name = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Author") m_Author = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Date") m_Date = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Version") m_Version = m0->getGroup(2);
+ if (m0->getGroup(1) == L"ButtonSmiley") m_ButtonSmiley = m0->getGroup(2);
}
delete m0;
delete otherf;
@@ -416,7 +415,7 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& win.y = 0;
{
_TPattern * pat = _TPattern::compile(
- _T("^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)"),
+ L"^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)",
_TPattern::MULTILINE_MATCHING);
_TMatcher * m0 = pat->createTMatcher(tbuf);
while (m0->findNextMatch())
@@ -425,9 +424,9 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& tpt.x = _ttol(m0->getGroup(2).c_str());
tpt.y = _ttol(m0->getGroup(3).c_str());
- if (m0->getGroup(1) == _T("Selection"))
+ if (m0->getGroup(1) == L"Selection")
selec = tpt;
- else if (m0->getGroup(1) == _T("Window"))
+ else if (m0->getGroup(1) == L"Window")
win = tpt;
}
delete m0;
@@ -435,12 +434,12 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& }
_TPattern * smiley = _TPattern::compile(
- _T("^\\s*Smiley(\\*)?\\s*=") // Is Hidden
- _T("(?:\\s*\"(.*)\")") // Smiley file name
- _T("(?:[\\s,]+(\\-?\\d+))") // Icon resource id
- _T("(?:[\\s,]+(R|S)?\"(.*?)\")") // Trigger text
- _T("(?:[\\s,]+\"(.*?)\")?") // Tooltip or insert text
- _T("(?:[\\s,]+\"(.*?)\")?"), // Tooltip text
+ L"^\\s*Smiley(\\*)?\\s*=" // Is Hidden
+ L"(?:\\s*\"(.*)\")" // Smiley file name
+ L"(?:[\\s,]+(\\-?\\d+))" // Icon resource id
+ L"(?:[\\s,]+(R|S)?\"(.*?)\")" // Trigger text
+ L"(?:[\\s,]+\"(.*?)\")?" // Tooltip or insert text
+ L"(?:[\\s,]+\"(.*?)\")?", // Tooltip text
_TPattern::MULTILINE_MATCHING);
_TMatcher * m0 = smiley->createTMatcher(tbuf);
@@ -451,7 +450,7 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& while (m0->findNextMatch())
{
bkstring resname = m0->getGroup(2);
- if (resname.find(_T("http://")) != resname.npos)
+ if (resname.find(L"http://") != resname.npos)
{
if (GetSmileyFile(resname, packstr)) continue;
}
@@ -467,8 +466,8 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& dat->SetHidden(m0->getStartingIndex(1) >= 0);
if (m0->getStartingIndex(4) >= 0)
{
- dat->SetRegEx(m0->getGroup(4) == _T("R"));
- dat->SetService(m0->getGroup(4) == _T("S"));
+ dat->SetRegEx(m0->getGroup(4) == L"R");
+ dat->SetService(m0->getGroup(4) == L"S");
}
dat->m_TriggerText = m0->getGroup(5);
if (dat->IsRegEx())
@@ -506,7 +505,7 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& if (!noerr)
{
- static const TCHAR errmsg[] = _T("Smiley #%u in file %s for Smiley Pack %s not found.");
+ static const TCHAR errmsg[] = LPGENT("Smiley #%u in file %s for Smiley Pack %s not found.");
TCHAR msgtxt[1024];
mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str());
CallService(MS_NETLIB_LOG,(WPARAM) hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt));
@@ -532,8 +531,8 @@ static void DecodeHTML(bkstring& str) {
if (str.find('&') != str.npos)
{
- str = _TPattern::replace(bkstring(_T("<")), str, bkstring(_T("<")));
- str = _TPattern::replace(bkstring(_T(">")), str, bkstring(_T(">")));
+ str = _TPattern::replace(bkstring(L"<"), str, bkstring(L"<"));
+ str = _TPattern::replace(bkstring(L">"), str, bkstring(L">"));
}
}
@@ -566,11 +565,11 @@ bool SmileyPackType::LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& {
_TMatcher *m0, *m1, *m2;
- _TPattern * dbname_re = _TPattern::compile(_T("<DataBaseName>\\s*\"(.*?)\"\\s*</DataBaseName>"),
+ _TPattern * dbname_re = _TPattern::compile(L"<DataBaseName>\\s*\"(.*?)\"\\s*</DataBaseName>",
_TPattern::MULTILINE_MATCHING);
- _TPattern * author_re = _TPattern::compile(_T("<PackageAuthor>\\s*\"(.*?)\"\\s*</PackageAuthor>"),
+ _TPattern * author_re = _TPattern::compile(L"<PackageAuthor>\\s*\"(.*?)\"\\s*</PackageAuthor>",
_TPattern::MULTILINE_MATCHING);
- _TPattern * settings_re = _TPattern::compile(_T("<settings>(.*?)</settings>"),
+ _TPattern * settings_re = _TPattern::compile(L"<settings>(.*?)</settings>",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
m0 = settings_re->createTMatcher(tbuf);
@@ -602,17 +601,17 @@ bool SmileyPackType::LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& if (!onlyInfo)
{
- _TPattern * record_re = _TPattern::compile(_T("<record.*?ImageIndex=\"(.*?)\".*?>(?:\\s*\"(.*?)\")?(.*?)</record>"),
+ _TPattern * record_re = _TPattern::compile(L"<record.*?ImageIndex=\"(.*?)\".*?>(?:\\s*\"(.*?)\")?(.*?)</record>",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
- _TPattern * expression_re = _TPattern::compile(_T("<Expression>\\s*\"(.*?)\"\\s*</Expression>"),
+ _TPattern * expression_re = _TPattern::compile(L"<Expression>\\s*\"(.*?)\"\\s*</Expression>",
_TPattern::MULTILINE_MATCHING);
- _TPattern * pastetext_re = _TPattern::compile(_T("<PasteText>\\s*\"(.*?)\"\\s*</PasteText>"),
+ _TPattern * pastetext_re = _TPattern::compile(L"<PasteText>\\s*\"(.*?)\"\\s*</PasteText>",
_TPattern::MULTILINE_MATCHING);
- _TPattern * images_re = _TPattern::compile(_T("<images>(.*?)</images>"),
+ _TPattern * images_re = _TPattern::compile(L"<images>(.*?)</images>",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
- _TPattern * image_re = _TPattern::compile(_T("<Image>(.*?)</Image>"),
+ _TPattern * image_re = _TPattern::compile(L"<Image>(.*?)</Image>",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
- _TPattern * imagedt_re = _TPattern::compile(_T("<!\\[CDATA\\[(.*?)\\]\\]>"),
+ _TPattern * imagedt_re = _TPattern::compile(L"<!\\[CDATA\\[(.*?)\\]\\]>",
_TPattern::MULTILINE_MATCHING );
m0 = images_re->createTMatcher(tbuf);
@@ -1037,7 +1036,7 @@ SmileyLookup::SmileyLookup(const bkstring& str, const bool regexs, const int ind m_ind = ind;
if (regexs)
{
- static const bkstring testString(_T("Test String"));
+ static const bkstring testString(L"Test String");
m_pattern = _TPattern::compile(str);
m_valid = m_pattern != NULL;
if (m_valid)
@@ -1047,14 +1046,14 @@ SmileyLookup::SmileyLookup(const bkstring& str, const bool regexs, const int ind matcher->getStartingIndex() != matcher->getEndingIndex());
if (!m_valid)
{
- static const TCHAR errmsg[] = _T("Regular Expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\".");
+ static const TCHAR errmsg[] = LPGENT("Regular Expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\".");
mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
delete matcher;
}
else
{
- static const TCHAR errmsg[] = _T("Regular Expression \"%s\" in smiley pack \"%s\" malformed.") ;
+ static const TCHAR errmsg[] = LPGENT("Regular Expression \"%s\" in smiley pack \"%s\" malformed.") ;
mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 40feda12ef..b6bf37a655 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -32,8 +32,8 @@ DWORD WINAPI LoadThread(LPVOID hd); // Additional languages that i could not find in Windows
TCHAR *aditionalLanguages[] = {
- _T("tl_PH"), _T("Tagalog (Philippines)"),
- _T("de_frami_neu"), _T("German (Germany)")
+ LPGENT("tl_PH"), LPGENT("Tagalog (Philippines)"),
+ LPGENT("de_frami_neu"), LPGENT("German (Germany)")
};
@@ -56,9 +56,9 @@ protected: void loadCustomDict()
{
TCHAR filename[1024];
- mir_sntprintf(filename, SIZEOF(filename), _T("%s\\%s.cdic"), userPath, language);
+ mir_sntprintf(filename, SIZEOF(filename), L"%s\\%s.cdic", userPath, language);
- FILE *file = _tfopen(filename, _T("rb"));
+ FILE *file = _tfopen(filename, L"rb");
if (file != NULL)
{
char tmp[1024];
@@ -91,9 +91,9 @@ protected: CreateDirectoryTreeT(userPath);
TCHAR filename[1024];
- mir_sntprintf(filename, SIZEOF(filename), _T("%s\\%s.cdic"), userPath, language);
+ mir_sntprintf(filename, SIZEOF(filename), L"%s\\%s.cdic", userPath, language);
- FILE *file = _tfopen(filename, _T("ab"));
+ FILE *file = _tfopen(filename, L"ab");
if (file != NULL)
{
char tmp[1024];
@@ -458,7 +458,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, SIZEOF(end));
TCHAR name[64];
- mir_sntprintf(name, SIZEOF(name), _T("%s_%s"), ini, end);
+ mir_sntprintf(name, SIZEOF(name), L"%s_%s", ini, end);
for(int i = 0; i < tmp_dicts->getCount(); i++)
{
@@ -482,7 +482,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) TCHAR name[1024];
if (country[0] != 0)
- mir_sntprintf(name, SIZEOF(name), _T("%s (%s)"), dict->english_name, country);
+ mir_sntprintf(name, SIZEOF(name), L"%s (%s)", dict->english_name, country);
else
lstrcpyn(name, dict->english_name, SIZEOF(name));
@@ -491,7 +491,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) if (dict->localized_name[0] != 0)
{
- mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language);
+ mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), L"%s [%s]", dict->localized_name, dict->language);
}
break;
}
@@ -537,7 +537,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts) if (dict->localized_name[0] != _T('\0'))
{
- mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language);
+ mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), L"%s [%s]", dict->localized_name, dict->language);
}
else
{
@@ -552,7 +552,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH {
// Load the language files and create an array with then
TCHAR file[1024];
- mir_sntprintf(file, SIZEOF(file), _T("%s\\*.dic"), path);
+ mir_sntprintf(file, SIZEOF(file), L"%s\\*.dic", path);
BOOL found = FALSE;
@@ -562,7 +562,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH {
do
{
- mir_sntprintf(file, SIZEOF(file), _T("%s\\%s"), path, ffd.cFileName);
+ mir_sntprintf(file, SIZEOF(file), L"%s\\%s", path, ffd.cFileName);
// Check .dic
DWORD attrib = GetFileAttributes(file);
@@ -570,7 +570,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH continue;
// See if .aff exists too
- lstrcpy(&file[lstrlen(file) - 4], _T(".aff"));
+ lstrcpy(&file[lstrlen(file) - 4], L".aff");
attrib = GetFileAttributes(file);
if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY))
continue;
@@ -613,11 +613,11 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa if (opts.use_other_apps_dicts)
{
- TCHAR *otherHunspellApps[] = { _T("Thunderbird"), _T("thunderbird.exe"),
- _T("Firefox"), _T("firefox.exe") };
+ TCHAR *otherHunspellApps[] = { L"Thunderbird", L"thunderbird.exe",
+ L"Firefox", L"firefox.exe" };
-#define APPPATH _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s")
-#define MUICACHE _T("Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache")
+#define APPPATH L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s"
+#define MUICACHE L"Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache"
// Get other apps dicts
for (int i = 0; i < SIZEOF(otherHunspellApps); i += 2)
@@ -630,7 +630,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_QUERY_VALUE, &hKey))
{
DWORD size = SIZEOF(key);
- lResult = RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (LPBYTE)key, &size);
+ lResult = RegQueryValueEx(hKey, L"Path", NULL, NULL, (LPBYTE)key, &size);
RegCloseKey(hKey);
}
else
@@ -668,7 +668,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa if (ERROR_SUCCESS == lResult)
{
TCHAR folder[1024];
- mir_sntprintf(folder, SIZEOF(folder), _T("%s\\Dictionaries"), key);
+ mir_sntprintf(folder, SIZEOF(folder), L"%s\\Dictionaries", key);
GetHunspellDictionariesFromFolder(languages, folder, user_path, otherHunspellApps[i]);
}
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index e4a6ec0855..fa3fee8bad 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -127,17 +127,17 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER); dictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, _T(".")); + FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, L"."); hCustomDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Custom Dictionaries"), CUSTOM_DICTIONARIES_FOLDER); customDictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, _T(".")); + FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, L"."); hFlagsDllFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Flags DLL"), FLAGS_DLL_FOLDER); flagsDllFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, _T(".")); + FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, L"."); } else { dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); @@ -154,7 +154,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) if (opts.use_flags) { // Load flags dll TCHAR flag_file[MAX_PATH]; - mir_sntprintf(flag_file, SIZEOF(flag_file), _T("%s\\flags_icons.dll"), flagsDllFolder); + mir_sntprintf(flag_file, SIZEOF(flag_file), L"%s\\flags_icons.dll", flagsDllFolder); HMODULE hFlagsDll = LoadLibraryEx(flag_file, NULL, LOAD_LIBRARY_AS_DATAFILE); TCHAR path[MAX_PATH]; @@ -162,7 +162,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) SKINICONDESC sid = { sizeof(sid) }; sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; - sid.ptszSection = _T("Spell Checker/Flags"); + sid.ptszSection = L"Spell Checker/Flags"; // Get language flags for(int i = 0; i < languages.getCount(); i++) { @@ -203,7 +203,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) Dictionary *dict = languages[j]; TCHAR filename[MAX_PATH]; - mir_sntprintf(filename, MAX_PATH, _T("%s\\%s.ar"), customDictionariesFolder, dict->language); + mir_sntprintf(filename, MAX_PATH, L"%s\\%s.ar", customDictionariesFolder, dict->language); dict->autoReplace = new AutoReplaceMap(filename, dict); if (lstrcmp(dict->language, opts.default_language) == 0) diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h index 70e36dfaed..62c1a0a7d8 100644 --- a/plugins/SplashScreen/src/debug.h +++ b/plugins/SplashScreen/src/debug.h @@ -43,7 +43,7 @@ int inline _DebugPopup(HANDLE hContact, TCHAR *fmt, ...) int inline initLog()
{
- fclose(_tfopen(szLogFile, _T("w")));
+ fclose(_tfopen(szLogFile, L"w"));
return 0;
}
@@ -53,8 +53,8 @@ int inline initLog() void inline logMessage(TCHAR *func, TCHAR *msg)
{
- FILE *f = _tfopen(szLogFile, _T("a"));
- _ftprintf(f, _T("%s:\t\t%s\n"), func, msg);
+ FILE *f = _tfopen(szLogFile, L"a");
+ _ftprintf(f, L"%s:\t\t%s\n", func, msg);
fclose(f);
}
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index 6d5cf7c553..d88b6938ee 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -63,7 +63,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP DBGetContactSettingTString(NULL, MODNAME, "Path", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
- _tcscpy_s(inBuf, _T("splash\\splash.png"));
+ _tcscpy_s(inBuf, L"splash\\splash.png");
DBFreeVariant(&dbv);
}
else
@@ -73,7 +73,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP DBGetContactSettingTString(NULL, MODNAME, "Sound", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
- _tcscpy_s(inBuf, _T("sounds\\startup.wav"));
+ _tcscpy_s(inBuf, L"sounds\\startup.wav");
DBFreeVariant(&dbv);
}
else
@@ -83,7 +83,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP DBGetContactSettingTString(NULL, MODNAME, "VersionPrefix", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
- _tcscpy_s(inBuf, _T(""));
+ _tcscpy_s(inBuf, L"");
DBFreeVariant(&dbv);
}
else
@@ -178,7 +178,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
else
{
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
lstrcpy(initDir, szMirDir);
mir_free(szMirDir);
}
@@ -186,7 +186,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP OPENFILENAME ofn = {0};
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
TCHAR tmp[MAX_PATH];
- mir_sntprintf(tmp, SIZEOF(tmp), _T("%s (*.png, *.bmp)%c*.png;*.bmp%c%c"), TranslateT("Graphic files"), 0, 0, 0);
+ mir_sntprintf(tmp, SIZEOF(tmp), L"%s (*.png, *.bmp)%c*.png;*.bmp%c%c", TranslateT("Graphic files"), 0, 0, 0);
ofn.lpstrFilter = tmp;
ofn.hwndOwner = 0;
ofn.lpstrFile = szTempPath;
@@ -195,14 +195,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ofn.Flags = OFN_HIDEREADONLY;
ofn.lpstrInitialDir = initDir;
*szTempPath = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn))
{
lstrcpy(szSplashFile, szTempPath);
#ifdef _DEBUG
- logMessage(_T("Set path"), szSplashFile);
+ logMessage(L"Set path", szSplashFile);
#endif
// Make path relative
@@ -243,7 +243,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
else
{
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
lstrcpy(initDir, szMirDir);
mir_free(szMirDir);
}
@@ -251,7 +251,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP OPENFILENAME ofn = {0};
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
TCHAR tmp[MAX_PATH];
- mir_sntprintf(tmp, SIZEOF(tmp), _T("%s (*.wav, *.mp3)%c*.wav;*.mp3%c%c"), TranslateT("Sound Files"), 0, 0, 0);
+ mir_sntprintf(tmp, SIZEOF(tmp), L"%s (*.wav, *.mp3)%c*.wav;*.mp3%c%c", TranslateT("Sound Files"), 0, 0, 0);
ofn.lpstrFilter = tmp;
ofn.hwndOwner = 0;
ofn.lpstrFile = szTempPath;
@@ -260,14 +260,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ofn.Flags = OFN_HIDEREADONLY;
ofn.lpstrInitialDir = initDir;
*szTempPath = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn))
{
lstrcpy(szSoundFile,szTempPath);
#ifdef _DEBUG
- logMessage(_T("Set sound path"), szSoundFile);
+ logMessage(L"Set sound path", szSoundFile);
#endif
// Make path relative
diff --git a/plugins/SplashScreen/src/services.cpp b/plugins/SplashScreen/src/services.cpp index f38c8eeb8f..1dfe6ee5fb 100644 --- a/plugins/SplashScreen/src/services.cpp +++ b/plugins/SplashScreen/src/services.cpp @@ -32,7 +32,7 @@ INT_PTR ShowSplashService(WPARAM wparam,LPARAM lparam) pos = _tcsrchr(filename, _T(':'));
if (pos == NULL)
- mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szMirDir, filename);
+ mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), L"%s\\%s", szMirDir, filename);
else
lstrcpy(szSplashFile, filename);
@@ -50,7 +50,7 @@ INT_PTR TestService(WPARAM wParam,LPARAM lParam) OPENFILENAME ofn={0};
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
- ofn.lpstrFilter = _T("PNG and BMP files\0*.png;*.bmp\0\0");
+ ofn.lpstrFilter = L"PNG and BMP files\0*.png;*.bmp\0\0";
ofn.hwndOwner=0;
ofn.lpstrFile = szTempPath;
ofn.nMaxFile = MAX_PATH;
@@ -58,7 +58,7 @@ INT_PTR TestService(WPARAM wParam,LPARAM lParam) ofn.Flags = OFN_HIDEREADONLY;
ofn.lpstrInitialDir = szSplashFile;
*szTempPath = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn))
CallService(MS_SHOWSPLASH,(WPARAM)szTempPath,0);
diff --git a/plugins/SplashScreen/src/splash.cpp b/plugins/SplashScreen/src/splash.cpp index 196c4adedd..aa7e4eba6e 100644 --- a/plugins/SplashScreen/src/splash.cpp +++ b/plugins/SplashScreen/src/splash.cpp @@ -29,7 +29,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_LOADED:
{
#ifdef _DEBUG
- logMessage(_T("WM_LOADED"), _T("called"));
+ logMessage(L"WM_LOADED", L"called");
#endif
if (!MyUpdateLayeredWindow) ShowWindow(hwndSplash, SW_SHOWNORMAL);
@@ -46,10 +46,10 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM #ifdef _DEBUG
TCHAR b [40];
- mir_sntprintf(b, SIZEOF(b), _T("%d"), wParam);
- logMessage(_T("Timer ID"), b);
- mir_sntprintf(b, SIZEOF(b), _T("%d"), options.showtime);
- logMessage(_T("ShowTime value"), b);
+ mir_sntprintf(b, SIZEOF(b), L"%d", wParam);
+ logMessage(L"Timer ID", b);
+ mir_sntprintf(b, SIZEOF(b), L"%d", options.showtime);
+ logMessage(L"ShowTime value", b);
#endif
if (options.showtime > 0) //TimeToShow enabled
@@ -58,7 +58,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM {
PostMessage(hwnd, WM_CLOSE, 0, 0);
#ifdef _DEBUG
- logMessage(_T("Showtime timer"), _T("triggered"));
+ logMessage(L"Showtime timer"), L"triggered");
#endif
}
}
@@ -68,13 +68,13 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM if (wParam == 7)
{
#ifdef _DEBUG
- logMessage(_T("On Modules Loaded timer"), _T("triggered"));
+ logMessage(L"On Modules Loaded timer", L"triggered");
#endif
}
if (wParam == 8)
{
#ifdef _DEBUG
- logMessage(_T("On Modules Loaded workaround"), _T("triggered"));
+ logMessage(L"On Modules Loaded workaround", L"triggered");
#endif
}
}
@@ -133,7 +133,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM {
PostQuitMessage(0);
#ifdef _DEBUG
- logMessage(_T("WM_DESTROY"), _T("called"));
+ logMessage(L"WM_DESTROY", L"called");
#endif
break;
}
@@ -262,11 +262,11 @@ int SplashThread(void *arg) TCHAR verString[256] = {0};
TCHAR* mirandaVerString = mir_a2t(szVersion);
- mir_sntprintf(verString, SIZEOF(verString), _T("%s%s"), szPrefix, mirandaVerString);
+ mir_sntprintf(verString, SIZEOF(verString), L"%s%s", szPrefix, mirandaVerString);
mir_free(mirandaVerString);
LOGFONT lf = {0};
lf.lfHeight = 14;
- _tcscpy_s(lf.lfFaceName, _T("Verdana"));
+ _tcscpy_s(lf.lfFaceName, L"Verdana");
SelectObject(SplashBmp->getDC(), CreateFontIndirect(&lf));
if (!splashWithMarkers)
{
@@ -317,7 +317,7 @@ int SplashThread(void *arg) if (SetTimer(hwndSplash, 6, DWORD(arg), 0))
{
#ifdef _DEBUG
- logMessage(_T("Timer TimeToShow"), _T("set"));
+ logMessage(L"Timer TimeToShow", L"set");
#endif
}
}
@@ -327,7 +327,7 @@ int SplashThread(void *arg) if (SetTimer(hwndSplash, 8, 2000, 0))
{
#ifdef _DEBUG
- logMessage(_T("Timer Modules loaded"), _T("set"));
+ logMessage(L"Timer Modules loaded", L"set");
#endif
}
}
@@ -361,7 +361,7 @@ BOOL ShowSplash(BOOL bpreview) SplashBmp = new MyBitmap;
#ifdef _DEBUG
- logMessage(_T("Loading splash file"), szSplashFile);
+ logMessage(L"Loading splash file", szSplashFile);
#endif
SplashBmp->loadFromFile(szSplashFile, NULL);
@@ -369,7 +369,7 @@ BOOL ShowSplash(BOOL bpreview) DWORD threadID;
#ifdef _DEBUG
- logMessage(_T("Thread"), _T("start"));
+ logMessage(L"Thread", L"start");
#endif
if (bpreview)
@@ -379,7 +379,7 @@ BOOL ShowSplash(BOOL bpreview) timeout = 2000;
#ifdef _DEBUG
- logMessage(_T("Preview"), _T("yes"));
+ logMessage(L"Preview", L"yes");
#endif
}
else
@@ -387,15 +387,15 @@ BOOL ShowSplash(BOOL bpreview) timeout = options.showtime;
#ifdef _DEBUG
TCHAR b [40];
- mir_sntprintf(b, SIZEOF(b), _T("%d"), options.showtime);
- logMessage(_T("Timeout"), b);
+ mir_sntprintf(b, SIZEOF(b), L"%d", options.showtime);
+ logMessage(L"Timeout", b);
#endif
}
hSplashThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)SplashThread, (LPVOID)timeout, 0, &threadID);
#ifdef _DEBUG
- logMessage(_T("Thread"), _T("end"));
+ logMessage(L"Thread", L"end");
#endif
CloseHandle(hSplashThread);
|