From 4fb814b906f54b18bcfa56654f019ed1ef36b98e Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 9 Mar 2013 19:25:58 +0000 Subject: added precompiled header git-svn-id: http://svn.miranda-ng.org/main/trunk@3946 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SplashScreen/src/headers.h | 5 +---- plugins/SplashScreen/src/main.cpp | 12 ++++++------ plugins/SplashScreen/src/options.cpp | 16 ++++++++-------- plugins/SplashScreen/src/services.cpp | 6 +++--- plugins/SplashScreen/src/stdafx.cpp | 18 ++++++++++++++++++ plugins/SplashScreen/src/version.h | 2 +- 6 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 plugins/SplashScreen/src/stdafx.cpp (limited to 'plugins/SplashScreen/src') diff --git a/plugins/SplashScreen/src/headers.h b/plugins/SplashScreen/src/headers.h index 8942202679..8211b3eaff 100644 --- a/plugins/SplashScreen/src/headers.h +++ b/plugins/SplashScreen/src/headers.h @@ -23,7 +23,6 @@ #define _WIN32_WINNT 0x0500 #define WINVER 0x0400 #define AC_SRC_ALPHA 0x01 -#define OEMRESOURCE #define _CRT_SECURE_NO_DEPRECATE #include @@ -31,7 +30,6 @@ #include #include -// Miranda API headers #include #include #include @@ -39,9 +37,8 @@ #include #include -#include "m_splash.h" +#include -// Common headers #include "version.h" #include "resource.h" #include "bitmap_funcs.h" diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index 4a18a103c1..96054f39f6 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -155,14 +155,14 @@ void SplashMain() TCHAR szExpandedSplashFile[MAX_PATH]; ExpandEnvironmentStrings(inBuf, szExpandedSplashFile, SIZEOF(szExpandedSplashFile)); - lstrcpy(inBuf, szExpandedSplashFile); + _tcscpy_s(inBuf, szExpandedSplashFile); TCHAR *pos3 = 0; pos3 = _tcsrchr(inBuf, _T(':')); if (pos3 == NULL) mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szMirDir, inBuf); else - lstrcpy(szSplashFile, inBuf); + _tcscpy_s(szSplashFile, inBuf); DBGetContactSettingTString(NULL, MODNAME, "Sound", &dbv); if (lstrcmp(dbv.ptszVal, NULL) == 0) @@ -175,14 +175,14 @@ void SplashMain() TCHAR szExpandedSoundFile[MAX_PATH]; ExpandEnvironmentStrings(inBuf, szExpandedSoundFile, SIZEOF(szExpandedSoundFile)); - lstrcpy(inBuf, szExpandedSoundFile); + _tcscpy_s(inBuf, szExpandedSoundFile); TCHAR *pos2; pos2 = _tcschr(inBuf, _T(':')); if (pos2 == NULL) mir_sntprintf(szSoundFile, SIZEOF(szSoundFile), _T("%s\\%s"), szMirDir, inBuf); else - lstrcpy(szSoundFile, inBuf); + _tcscpy_s(szSoundFile, inBuf); #ifdef _DEBUG logMessage(_T("SoundFilePath"), szSoundFile); @@ -197,8 +197,8 @@ void SplashMain() TCHAR* p = 0; TCHAR files [255][50]; //TODO: make memory allocation dynamic - lstrcpy(szSplashDir, szSplashFile); - lstrcpy(szOldPath, szSplashFile); + _tcscpy_s(szSplashDir, szSplashFile); + _tcscpy_s(szOldPath, szSplashFile); // find the last \ and null it out, this leaves no trailing slash p = _tcsrchr(szSplashDir, _T('\\')); if (p) *p = 0; diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index c604d305f0..8c0248985b 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -172,14 +172,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (Exists(szSplashFile)) { - lstrcpy(initDir, szSplashFile); + _tcscpy_s(initDir, szSplashFile); pos = _tcsrchr(initDir, _T('\\')); if(pos != NULL) *pos = 0; } else { szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%")); - lstrcpy(initDir, szMirDir); + _tcscpy_s(initDir, szMirDir); mir_free(szMirDir); } @@ -199,7 +199,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (GetOpenFileName(&ofn)) { - lstrcpy(szSplashFile, szTempPath); + _tcscpy_s(szSplashFile, szTempPath); #ifdef _DEBUG logMessage(_T("Set path"), szSplashFile); @@ -216,7 +216,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (pos != NULL) { *pos = 0; - lstrcat(szPath2Spash, _T("\\")); + _tcscat_s(szPath2Spash, _T("\\")); } } @@ -236,14 +236,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (Exists(szSoundFile)) { - lstrcpy(initDir, szSoundFile); + _tcscpy_s(initDir, szSoundFile); pos = _tcsrchr(initDir, _T('\\')); if(pos != NULL) *pos = 0; } else { szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%")); - lstrcpy(initDir, szMirDir); + _tcscpy_s(initDir, szMirDir); mir_free(szMirDir); } @@ -263,7 +263,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (GetOpenFileName(&ofn)) { - lstrcpy(szSoundFile,szTempPath); + _tcscpy_s(szSoundFile,szTempPath); #ifdef _DEBUG logMessage(_T("Set sound path"), szSoundFile); @@ -308,7 +308,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP GetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), tmp, MAX_PATH); DBWriteContactSettingTString(NULL, MODNAME, "VersionPrefix", tmp); - lstrcpy(szPrefix, tmp); + _tcscpy_s(szPrefix, tmp); GetWindowText(GetDlgItem(hwndDlg, IDC_SHOWTIME), tmp, MAX_PATH); DBWriteContactSettingDword(NULL, MODNAME, "TimeToShow", _ttoi(tmp)); diff --git a/plugins/SplashScreen/src/services.cpp b/plugins/SplashScreen/src/services.cpp index 44ee1861b3..def64f0684 100644 --- a/plugins/SplashScreen/src/services.cpp +++ b/plugins/SplashScreen/src/services.cpp @@ -27,18 +27,18 @@ INT_PTR ShowSplashService(WPARAM wparam,LPARAM lparam) TCHAR* filename = (TCHAR*) wparam; int timetoshow = (int) lparam; - lstrcpy(szOldfn, szSplashFile); + _tcscpy_s(szOldfn, szSplashFile); options.showtime = timetoshow; pos = _tcsrchr(filename, _T(':')); if (pos == NULL) mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szMirDir, filename); else - lstrcpy(szSplashFile, filename); + _tcscpy_s(szSplashFile, filename); ShowSplash(false); - lstrcpy(szSplashFile, szOldfn); + _tcscpy_s(szSplashFile, szOldfn); return 0; } diff --git a/plugins/SplashScreen/src/stdafx.cpp b/plugins/SplashScreen/src/stdafx.cpp new file mode 100644 index 0000000000..48d92d3d56 --- /dev/null +++ b/plugins/SplashScreen/src/stdafx.cpp @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "headers.h" \ No newline at end of file diff --git a/plugins/SplashScreen/src/version.h b/plugins/SplashScreen/src/version.h index 1431bbe216..9e8a1f4e88 100644 --- a/plugins/SplashScreen/src/version.h +++ b/plugins/SplashScreen/src/version.h @@ -5,7 +5,7 @@ #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM -#define __PLUGIN_NAME "Splash Screen" +#define __PLUGIN_NAME "Splash screen" #define __FILENAME "SplashScreen.dll" #define __DESCRIPTION "Shows a splash at Miranda startup." #define __AUTHOR "nullbie, Thief" -- cgit v1.2.3