diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
commit | 8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch) | |
tree | 94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/SplashScreen/src | |
parent | 1e273e28d89b5838e3d0f0cafac9676577cb71ce (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/SplashScreen/src')
-rw-r--r-- | plugins/SplashScreen/src/bitmap_funcs.cpp | 2 | ||||
-rw-r--r-- | plugins/SplashScreen/src/debug.h | 6 | ||||
-rw-r--r-- | plugins/SplashScreen/src/main.cpp | 62 | ||||
-rw-r--r-- | plugins/SplashScreen/src/options.cpp | 24 | ||||
-rw-r--r-- | plugins/SplashScreen/src/services.cpp | 2 | ||||
-rw-r--r-- | plugins/SplashScreen/src/splash.cpp | 36 |
6 files changed, 66 insertions, 66 deletions
diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp index e90ec277d1..33ef919c64 100644 --- a/plugins/SplashScreen/src/bitmap_funcs.cpp +++ b/plugins/SplashScreen/src/bitmap_funcs.cpp @@ -134,7 +134,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn) HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_TCHAR);
if (!hBmpLoaded) {
#ifdef _DEBUG
- logMessage(_T("MyBitmap::loadFromFile"), _T("Bitmap load failed"));
+ logMessage(L"MyBitmap::loadFromFile", L"Bitmap load failed");
#endif
return false;
}
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h index 5a475e9286..3132433ccb 100644 --- a/plugins/SplashScreen/src/debug.h +++ b/plugins/SplashScreen/src/debug.h @@ -41,7 +41,7 @@ int inline _DebugPopup(MCONTACT hContact, TCHAR *fmt, ...) int inline initLog()
{
- fclose(_tfopen(szLogFile, _T("w")));
+ fclose(_tfopen(szLogFile, L"w"));
return 0;
}
@@ -51,8 +51,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/main.cpp b/plugins/SplashScreen/src/main.cpp index b73c27c053..74eeb0ff7c 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -64,18 +64,18 @@ void SplashMain() {
if (bstartup) {
// Retrive path to exe of current running Miranda is located
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
- mir_sntprintf(szhAdvaimgPath, _T("%s\\plugins\\advaimg.dll"), szMirDir);
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
+ mir_sntprintf(szhAdvaimgPath, L"%s\\plugins\\advaimg.dll", szMirDir);
CallService(MS_SYSTEM_GETVERSIONTEXT, MAX_PATH, (LPARAM)szVersion);
#ifdef _DEBUG
- mir_sntprintf(szLogFile, _T("%s\\%s.log"), szMirDir, _T(__PLUGIN_NAME));
+ mir_sntprintf(szLogFile, L"%s\\%s.log", szMirDir, _T(__PLUGIN_NAME));
initLog();
TCHAR *mirandaVerString = mir_a2t(szVersion);
- logMessage(_T("Miranda version"), mirandaVerString);
+ logMessage(L"Miranda version", mirandaVerString);
mir_free(mirandaVerString);
- logMessage(_T("Dll Name"), _T(__FILENAME));
- logMessage(_T("Advaimg path"), szhAdvaimgPath);
+ logMessage(L"Dll Name", _T(__FILENAME));
+ logMessage(L"Advaimg path", szhAdvaimgPath);
#endif
ReadDbConfig();
@@ -88,14 +88,14 @@ void SplashMain() db_free(&dbv);
}
else
- mir_tstrcpy(szPrefix, _T(""));
+ mir_tstrcpy(szPrefix, L"");
if (!db_get_ts(NULL, MODNAME, "Path", &dbv)) {
mir_tstrcpy(inBuf, dbv.ptszVal);
db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("splash\\splash.png"));
+ mir_tstrcpy(inBuf, L"splash\\splash.png");
TCHAR szExpandedSplashFile[MAX_PATH];
ExpandEnvironmentStrings(inBuf, szExpandedSplashFile, _countof(szExpandedSplashFile));
@@ -104,7 +104,7 @@ void SplashMain() TCHAR *pos3 = 0;
pos3 = _tcsrchr(inBuf, _T(':'));
if (pos3 == NULL)
- mir_sntprintf(szSplashFile, _T("%s\\%s"), szMirDir, inBuf);
+ mir_sntprintf(szSplashFile, L"%s\\%s", szMirDir, inBuf);
else
mir_tstrcpy(szSplashFile, inBuf);
@@ -113,7 +113,7 @@ void SplashMain() db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("sounds\\startup.wav"));
+ mir_tstrcpy(inBuf, L"sounds\\startup.wav");
TCHAR szExpandedSoundFile[MAX_PATH];
ExpandEnvironmentStrings(inBuf, szExpandedSoundFile, _countof(szExpandedSoundFile));
@@ -122,12 +122,12 @@ void SplashMain() TCHAR *pos2;
pos2 = _tcschr(inBuf, _T(':'));
if (pos2 == NULL)
- mir_sntprintf(szSoundFile, _T("%s\\%s"), szMirDir, inBuf);
+ mir_sntprintf(szSoundFile, L"%s\\%s", szMirDir, inBuf);
else
mir_tstrcpy(szSoundFile, inBuf);
#ifdef _DEBUG
- logMessage(_T("SoundFilePath"), szSoundFile);
+ logMessage(L"SoundFilePath", szSoundFile);
#endif
TCHAR szOldPath[MAX_PATH] = { 0 };
@@ -145,7 +145,7 @@ void SplashMain() p = _tcsrchr(szSplashDir, _T('\\'));
if (p) *p = 0;
// create the search filter
- mir_sntprintf(szSearch, _T("%s\\*.*"), szSplashDir);
+ mir_sntprintf(szSearch, L"%s\\*.*", szSplashDir);
// FFFN will return filenames
HANDLE hFind = INVALID_HANDLE_VALUE;
WIN32_FIND_DATA ffd;
@@ -154,7 +154,7 @@ void SplashMain() do {
if (!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) {
#ifdef _DEBUG
- logMessage(_T("Found file"), ffd.cFileName);
+ logMessage(L"Found file", ffd.cFileName);
#endif
//files = new char[mir_strlen(ffd.cFileName)];
//files[filescount] = new char[mir_strlen(ffd.cFileName)];
@@ -162,14 +162,14 @@ void SplashMain() wmemcpy(ext, ffd.cFileName + (mir_tstrlen(ffd.cFileName) - 4), 5);
#ifdef _DEBUG
- logMessage(_T("Extention"), ext);
+ logMessage(L"Extention", ext);
#endif
- if (mir_tstrcmpi(ext, _T(".png")) & mir_tstrcmpi(ext, _T(".bmp")))
+ if (mir_tstrcmpi(ext, L".png") & mir_tstrcmpi(ext, L".bmp"))
continue;
#ifdef _DEBUG
- logMessage(_T("File has valid ext"), ext);
+ logMessage(L"File has valid ext", ext);
#endif
mir_tstrcpy(files[filescount++], ffd.cFileName);
} //if
@@ -179,10 +179,10 @@ void SplashMain() int r = 0;
if (filescount) r = (rand() % filescount) + 1;
- mir_sntprintf(szSplashFile, _T("%s\\%s"), szSplashDir, files[r - 1]);
+ mir_sntprintf(szSplashFile, L"%s\\%s", szSplashDir, files[r - 1]);
#ifdef _DEBUG
- logMessage(_T("final file"), szSplashFile);
+ logMessage(L"final file", szSplashFile);
#endif
FindClose(hFind);
} //if
@@ -204,20 +204,20 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) if (!strcmp(cws->szModule, "Skin") && !strcmp(cws->szSetting, "UseSound")) {
db_set_b(NULL, MODNAME, "PlaySound", cws->value.bVal);
#ifdef _DEBUG
- cws->value.bVal ? _DebugPopup(NULL, _T("Sounds enabled."), _T("")) : _DebugPopup(NULL, _T("Sounds disabled."), _T(""));
- logMessage(_T("Module"), _A2T(cws->szModule));
- logMessage(_T("Setting"), _A2T(cws->szSetting));
- logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10));
+ cws->value.bVal ? _DebugPopup(NULL, L"Sounds enabled.", L"") : _DebugPopup(NULL, L"Sounds disabled.", L"");
+ logMessage(L"Module", _A2T(cws->szModule));
+ logMessage(L"Setting", _A2T(cws->szSetting));
+ logMessage(L"Value", _itot(cws->value.bVal, buf, 10));
#endif
}
if (!strcmp(cws->szModule, "PluginDisable") && !strcmp(cws->szSetting, _T2A(szDllName))) {
db_set_b(NULL, MODNAME, "Active", cws->value.bVal);
#ifdef _DEBUG
- cws->value.bVal ? _DebugPopup(NULL, _T("Disabled."), "") : _DebugPopup(NULL, _T("Enabled."), _T(""));
- logMessage(_T("PlugDisableHook"), _T("Triggered"));
- logMessage(_T("Module"), _A2T(cws->szModule));
- logMessage(_T("Setting"), _A2T(cws->szSetting));
- logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10));
+ cws->value.bVal ? _DebugPopup(NULL, L"Disabled.", "") : _DebugPopup(NULL, L"Enabled.", L"");
+ logMessage(L"PlugDisableHook", L"Triggered");
+ logMessage(L"Module", _A2T(cws->szModule));
+ logMessage(L"Setting", _A2T(cws->szSetting));
+ logMessage(L"Value", _itot(cws->value.bVal, buf, 10));
#endif
}
}
@@ -232,7 +232,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) if (hwndSplash) {
if (PostMessage(hwndSplash, WM_LOADED, 0, 0)) {
#ifdef _DEBUG
- logMessage(_T("Posted WM_LOADED message"), _T("done"));
+ logMessage(L"Posted WM_LOADED message", L"done");
#endif
}
}
@@ -245,7 +245,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) CreateServiceFunction(MS_SHOWSPLASH, ShowSplashService);
#ifdef _DEBUG
- logMessage(_T("Loading modules"), _T("done"));
+ logMessage(L"Loading modules", L"done");
#endif
return 0;
@@ -278,7 +278,7 @@ extern "C" int __declspec(dllexport) Unload(void) FreeLibrary(hAdvaimg);
#ifdef _DEBUG
- logMessage(_T("Unload"), _T("Job done"));
+ logMessage(L"Unload", L"Job done");
#endif
return 0;
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index 536af1505a..845a016ab4 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -73,7 +73,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("splash\\splash.png"));
+ mir_tstrcpy(inBuf, L"splash\\splash.png");
SetDlgItemText(hwndDlg, IDC_SPLASHPATH, inBuf);
if (!db_get_ts(NULL, MODNAME, "Sound", &dbv)) {
@@ -81,7 +81,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("sounds\\startup.wav"));
+ mir_tstrcpy(inBuf, L"sounds\\startup.wav");
SetDlgItemText(hwndDlg, IDC_SNDPATH, inBuf);
if (!db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv)) {
@@ -89,7 +89,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T(""));
+ mir_tstrcpy(inBuf, L"");
SetDlgItemText(hwndDlg, IDC_VERSIONPREFIX, inBuf);
if (options.active)
@@ -175,13 +175,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP *pos = 0;
}
else {
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
mir_tstrcpy(initDir, szMirDir);
mir_free(szMirDir);
}
TCHAR tmp[MAX_PATH];
- mir_sntprintf(tmp, _T("%s (*.png, *.bmp)%c*.png;*.bmp%c%c"), TranslateT("Graphic files"), 0, 0, 0);
+ mir_sntprintf(tmp, L"%s (*.png, *.bmp)%c*.png;*.bmp%c%c", TranslateT("Graphic files"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
@@ -192,13 +192,13 @@ 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)) {
mir_tstrcpy(szSplashFile, szTempPath);
#ifdef _DEBUG
- logMessage(_T("Set path"), szSplashFile);
+ logMessage(L"Set path", szSplashFile);
#endif
// Make path relative
int result = PathToRelativeT(szTempPath, szPath2Spash);
@@ -207,7 +207,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR *pos = _tcsrchr(szPath2Spash, _T('\\'));
if (pos != NULL) {
*pos = 0;
- mir_tstrcat(szPath2Spash, _T("\\"));
+ mir_tstrcat(szPath2Spash, L"\\");
}
}
@@ -231,7 +231,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (pos != NULL) *pos = 0;
}
else {
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
mir_tstrcpy(initDir, szMirDir);
mir_free(szMirDir);
}
@@ -239,7 +239,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, _T("%s (*.wav, *.mp3)%c*.wav;*.mp3%c%c"), TranslateT("Sound Files"), 0, 0, 0);
+ mir_sntprintf(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;
@@ -248,13 +248,13 @@ 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)) {
mir_tstrcpy(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 b89daaa23d..e7aa6c7a66 100644 --- a/plugins/SplashScreen/src/services.cpp +++ b/plugins/SplashScreen/src/services.cpp @@ -31,7 +31,7 @@ INT_PTR ShowSplashService(WPARAM wparam, LPARAM lparam) TCHAR *pos = _tcsrchr(filename, _T(':'));
if (pos == NULL)
- mir_sntprintf(szSplashFile, _T("%s\\%s"), szMirDir, filename);
+ mir_sntprintf(szSplashFile, L"%s\\%s", szMirDir, filename);
else
mir_tstrcpy(szSplashFile, filename);
diff --git a/plugins/SplashScreen/src/splash.cpp b/plugins/SplashScreen/src/splash.cpp index cab40ef640..9e209b906a 100644 --- a/plugins/SplashScreen/src/splash.cpp +++ b/plugins/SplashScreen/src/splash.cpp @@ -27,7 +27,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM switch (message) {
case WM_LOADED:
#ifdef _DEBUG
- logMessage(_T("WM_LOADED"), _T("called"));
+ logMessage(L"WM_LOADED", L"called");
#endif
if (!options.showtime)
@@ -42,17 +42,17 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM #ifdef _DEBUG
TCHAR b[40];
- mir_sntprintf(b, _T("%d"), wParam);
- logMessage(_T("Timer ID"), b);
- mir_sntprintf(b, _T("%d"), options.showtime);
- logMessage(_T("ShowTime value"), b);
+ mir_sntprintf(b, L"%d", wParam);
+ logMessage(L"Timer ID", b);
+ mir_sntprintf(b, L"%d", options.showtime);
+ logMessage(L"ShowTime value", b);
#endif
if (options.showtime > 0) { // TimeToShow enabled
if (wParam == 6) {
PostMessage(hwnd, WM_CLOSE, 0, 0);
#ifdef _DEBUG
- logMessage(_T("Showtime timer"), _T("triggered"));
+ logMessage(L"Showtime timer", L"triggered");
#endif
}
}
@@ -60,7 +60,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM PostMessage(hwnd, WM_CLOSE, 0, 0);
if (wParam == 7) {
#ifdef _DEBUG
- logMessage(_T("On Modules Loaded timer"), _T("triggered"));
+ logMessage(L"On Modules Loaded timer", L"triggered");
#endif
}
}
@@ -108,7 +108,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_DESTROY:
#ifdef _DEBUG
- logMessage(_T("WM_DESTROY"), _T("called"));
+ logMessage(L"WM_DESTROY", L"called");
#endif
ShowWindow(hwndSplash, SW_HIDE);
DestroyWindow(hwndSplash);
@@ -229,11 +229,11 @@ void __cdecl SplashThread(void *arg) TCHAR verString[256] = { 0 };
TCHAR *mirandaVerString = mir_a2t(szVersion);
- mir_sntprintf(verString, _T("%s%s"), szPrefix, mirandaVerString);
+ mir_sntprintf(verString, L"%s%s", szPrefix, mirandaVerString);
mir_free(mirandaVerString);
LOGFONT lf = { 0 };
lf.lfHeight = 14;
- mir_tstrcpy(lf.lfFaceName, _T("Verdana"));
+ mir_tstrcpy(lf.lfFaceName, L"Verdana");
SelectObject(SplashBmp->getDC(), CreateFontIndirect(&lf));
if (!splashWithMarkers) {
SIZE v_sz = { 0, 0 };
@@ -266,7 +266,7 @@ void __cdecl SplashThread(void *arg) if (DWORD_PTR(arg) > 0) {
if (SetTimer(hwndSplash, 6, DWORD_PTR(arg), 0)) {
#ifdef _DEBUG
- logMessage(_T("Timer TimeToShow"), _T("set"));
+ logMessage(L"Timer TimeToShow", L"set");
#endif
}
}
@@ -274,7 +274,7 @@ void __cdecl SplashThread(void *arg) if (bmodulesloaded) {
if (SetTimer(hwndSplash, 8, 2000, 0)) {
#ifdef _DEBUG
- logMessage(_T("Timer Modules loaded"), _T("set"));
+ logMessage(L"Timer Modules loaded", L"set");
#endif
}
}
@@ -304,14 +304,14 @@ BOOL ShowSplash(BOOL bpreview) SplashBmp = new MyBitmap;
#ifdef _DEBUG
- logMessage(_T("Loading splash file"), szSplashFile);
+ logMessage(L"Loading splash file", szSplashFile);
#endif
if (!SplashBmp->loadFromFile(szSplashFile))
return 0;
#ifdef _DEBUG
- logMessage(_T("Thread"), _T("start"));
+ logMessage(L"Thread", L"start");
#endif
if (bpreview) {
@@ -320,22 +320,22 @@ BOOL ShowSplash(BOOL bpreview) timeout = 2000;
#ifdef _DEBUG
- logMessage(_T("Preview"), _T("yes"));
+ logMessage(L"Preview", L"yes");
#endif
}
else {
timeout = options.showtime;
#ifdef _DEBUG
TCHAR b[40];
- mir_sntprintf(b, _T("%d"), options.showtime);
- logMessage(_T("Timeout"), b);
+ mir_sntprintf(b, L"%d", options.showtime);
+ logMessage(L"Timeout", b);
#endif
}
mir_forkthread(SplashThread, (void*)timeout);
#ifdef _DEBUG
- logMessage(_T("Thread"), _T("end"));
+ logMessage(L"Thread", L"end");
#endif
return 1;
}
|