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/SplashScreen/src/main.cpp | 62 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'plugins/SplashScreen/src/main.cpp') 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; -- cgit v1.2.3