From f33e8fab62c9ee9a73617fafde7b33715420f4c9 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 Feb 2013 14:01:17 +0000 Subject: added precompiled header added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@3724 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CSList/cslist_10.vcxproj | 23 ++++++++-- plugins/CSList/cslist_10.vcxproj.filters | 9 ++-- plugins/CSList/cslist_11.vcxproj | 23 ++++++++-- plugins/CSList/cslist_11.vcxproj.filters | 3 ++ plugins/CSList/res/Version.rc | 4 -- plugins/CSList/res/global.ico | Bin 1150 -> 0 bytes plugins/CSList/res/options.ico | Bin 1150 -> 0 bytes plugins/CSList/src/Version.h | 10 +---- plugins/CSList/src/cslist.cpp | 17 ++++++-- plugins/CSList/src/cslist.h | 71 +++++++------------------------ plugins/CSList/src/resource.h | 1 - plugins/CSList/src/stdafx.cpp | 18 ++++++++ 12 files changed, 95 insertions(+), 84 deletions(-) delete mode 100644 plugins/CSList/res/global.ico delete mode 100644 plugins/CSList/res/options.ico create mode 100644 plugins/CSList/src/stdafx.cpp diff --git a/plugins/CSList/cslist_10.vcxproj b/plugins/CSList/cslist_10.vcxproj index a59542f3bf..adc9240750 100644 --- a/plugins/CSList/cslist_10.vcxproj +++ b/plugins/CSList/cslist_10.vcxproj @@ -75,11 +75,13 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 false + Use + cslist.h NDEBUG;%(PreprocessorDefinitions) @@ -94,6 +96,7 @@ Windows $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% + comctl32.lib;%(AdditionalDependencies) @@ -102,11 +105,13 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 false + Use + cslist.h NDEBUG;%(PreprocessorDefinitions) @@ -121,13 +126,14 @@ Windows $(ProfileDir)..\..\bin10\lib /PDBALTPATH:%_PDB% + comctl32.lib;%(AdditionalDependencies) Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true MultiThreadedDebugDLL true @@ -135,6 +141,8 @@ Level3 EditAndContinue false + Use + cslist.h _DEBUG;%(PreprocessorDefinitions) @@ -146,19 +154,22 @@ $(IntDir)$(TargetName).lib Windows $(ProfileDir)..\..\bin10\lib + comctl32.lib;%(AdditionalDependencies) Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true MultiThreadedDebugDLL true Fast Level3 false + Use + cslist.h _DEBUG;%(PreprocessorDefinitions) @@ -170,10 +181,14 @@ $(IntDir)$(TargetName).lib Windows $(ProfileDir)..\..\bin10\lib + comctl32.lib;%(AdditionalDependencies) + + Create + diff --git a/plugins/CSList/cslist_10.vcxproj.filters b/plugins/CSList/cslist_10.vcxproj.filters index d84ed620d3..a38e2f705e 100644 --- a/plugins/CSList/cslist_10.vcxproj.filters +++ b/plugins/CSList/cslist_10.vcxproj.filters @@ -18,6 +18,9 @@ Source Files + + Source Files + @@ -26,12 +29,12 @@ Header Files - - Resource Files - Header Files + + Header Files + diff --git a/plugins/CSList/cslist_11.vcxproj b/plugins/CSList/cslist_11.vcxproj index eb5112eccb..b295e1345e 100644 --- a/plugins/CSList/cslist_11.vcxproj +++ b/plugins/CSList/cslist_11.vcxproj @@ -79,11 +79,13 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 false + Use + cslist.h NDEBUG;%(PreprocessorDefinitions) @@ -98,6 +100,7 @@ Windows $(ProfileDir)..\..\bin11\lib /PDBALTPATH:%_PDB% + comctl32.lib;%(AdditionalDependencies) @@ -106,11 +109,13 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 false + Use + cslist.h NDEBUG;%(PreprocessorDefinitions) @@ -125,13 +130,14 @@ Windows $(ProfileDir)..\..\bin11\lib /PDBALTPATH:%_PDB% + comctl32.lib;%(AdditionalDependencies) Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true MultiThreadedDebugDLL true @@ -139,6 +145,8 @@ Level3 EditAndContinue false + Use + cslist.h _DEBUG;%(PreprocessorDefinitions) @@ -150,19 +158,22 @@ $(IntDir)$(TargetName).lib Windows $(ProfileDir)..\..\bin11\lib + comctl32.lib;%(AdditionalDependencies) Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true MultiThreadedDebugDLL true Fast Level3 false + Use + cslist.h _DEBUG;%(PreprocessorDefinitions) @@ -174,10 +185,14 @@ $(IntDir)$(TargetName).lib Windows $(ProfileDir)..\..\bin11\lib + comctl32.lib;%(AdditionalDependencies) + + Create + diff --git a/plugins/CSList/cslist_11.vcxproj.filters b/plugins/CSList/cslist_11.vcxproj.filters index c3ac63e74c..a38e2f705e 100644 --- a/plugins/CSList/cslist_11.vcxproj.filters +++ b/plugins/CSList/cslist_11.vcxproj.filters @@ -18,6 +18,9 @@ Source Files + + Source Files + diff --git a/plugins/CSList/res/Version.rc b/plugins/CSList/res/Version.rc index d741488c4f..5bfbab4754 100644 --- a/plugins/CSList/res/Version.rc +++ b/plugins/CSList/res/Version.rc @@ -7,10 +7,6 @@ #include "afxres.h" #include "..\src\version.h" -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#endif //_WIN32 - VS_VERSION_INFO VERSIONINFO FILEVERSION __FILEVERSION_STRING PRODUCTVERSION __FILEVERSION_STRING diff --git a/plugins/CSList/res/global.ico b/plugins/CSList/res/global.ico deleted file mode 100644 index 1e876b1b1c..0000000000 Binary files a/plugins/CSList/res/global.ico and /dev/null differ diff --git a/plugins/CSList/res/options.ico b/plugins/CSList/res/options.ico deleted file mode 100644 index 703e3e0ce2..0000000000 Binary files a/plugins/CSList/res/options.ico and /dev/null differ diff --git a/plugins/CSList/src/Version.h b/plugins/CSList/src/Version.h index f9fe5b93b7..a201b60c97 100644 --- a/plugins/CSList/src/Version.h +++ b/plugins/CSList/src/Version.h @@ -4,16 +4,8 @@ #define __BUILD_NUM 0 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM -#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -#define __STRINGIFY_IMPL(x) #x -#define __STRINGIFY(x) __STRINGIFY_IMPL(x) -#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS) - - - -#define __PLUGIN_NAME "Custom Status List mod" -#define __INTERNAL_NAME "CSList" +#define __PLUGIN_NAME "Custom status list" #define __FILENAME "CSList.dll" #define __DESCRIPTION "This plugin offers simple management functions to keep your extra statuses on one place." #define __AUTHOR "Mataes, jarvis" diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index ee3d6ccad1..bf2f093749 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -45,7 +45,7 @@ PLUGININFOEX pluginInfoEx = __AUTHORWEB, UNICODE_AWARE, // {C8CC7414-6507-4AF6-925A-83C1D2F7BE8C} - { 0xc8cc7414, 0x6507, 0x4af6, { 0x92, 0x5a, 0x83, 0xc1, 0xd2, 0xf7, 0xbe, 0x8c } } + {0xc8cc7414, 0x6507, 0x4af6, {0x92, 0x5a, 0x83, 0xc1, 0xd2, 0xf7, 0xbe, 0x8c}} }; // ====[ MAIN ]=============================================================== @@ -140,7 +140,7 @@ extern "C" __declspec(dllexport) int Load() for (int i=0; i < SIZEOF(forms); i++) { char szSettingName[64]; - mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", __INTERNAL_NAME, forms[i].pszIconIcoLib); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODNAME, forms[i].pszIconIcoLib); sid.pszName = szSettingName; sid.ptszDescription = forms[i].ptszDescr; @@ -312,6 +312,15 @@ CSWindow::CSWindow(char *protoName) m_filterString = NULL; } +void __fastcall SAFE_FREE(void** p) +{ + if (*p) + { + free(*p); + *p = NULL; + } +} + CSWindow::~CSWindow() { delete m_itemslist; @@ -372,8 +381,8 @@ void CSWindow::initButtons() void CSWindow::loadWindowPosition() { - if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION )) - Utils_RestoreWindowPosition(m_handle,NULL,__INTERNAL_NAME,"Position"); + if (getByte("RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION)) + Utils_RestoreWindowPosition(m_handle, NULL, MODNAME, "Position"); } void CSWindow::toggleEmptyListMessage() diff --git a/plugins/CSList/src/cslist.h b/plugins/CSList/src/cslist.h index a8324f1c1f..60af6dcfe8 100644 --- a/plugins/CSList/src/cslist.h +++ b/plugins/CSList/src/cslist.h @@ -22,16 +22,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - ============================================================================ - - File name : $URL$ - Revision : $Rev$ - Last change on : $Date$ - Last change by : $Author$ - - ============================================================================ - - DESCRIPTION: Offers List of your Custom Statuses. @@ -43,44 +33,34 @@ #ifndef __CSLIST_H #define __CSLIST_H 1 - #define WINVER 0x501 #define _WIN32_WINNT 0x501 #define _WIN32_IE 0x600 -#define MIRANDA_VER 0x0A00 - -#pragma warning( disable: 4996 ) -#pragma comment( lib, "comctl32.lib") +#define _CRT_SECURE_NO_WARNINGS #include -#include -#include -#include #include #include -#include #include #include -#include #include -#include -#include #include -#include #include #include #include #include -#include -// ====[ BASIC DEFINITIONS ]================================================== +#include #include "resource.h" #include "version.h" +// ====[ BASIC DEFINITIONS ]================================================== + #define MODULENAME LPGEN("Custom Status List") +#define MODNAME "CSList" // ====[ LIMITS ]============================================================= @@ -109,15 +89,15 @@ #define ListView_SetSelectionMark( x, y ) 0 #endif -#define getByte( setting, error ) DBGetContactSettingByte( NULL, __INTERNAL_NAME, setting, error ) -#define setByte( setting, value ) DBWriteContactSettingByte( NULL, __INTERNAL_NAME, setting, value ) -#define getWord( setting, error ) DBGetContactSettingWord( NULL, __INTERNAL_NAME, setting, error ) -#define setWord( setting, value ) DBWriteContactSettingWord( NULL, __INTERNAL_NAME, setting, value ) -#define getDword( setting, error ) DBGetContactSettingDword( NULL, __INTERNAL_NAME, setting, error ) -#define setDword( setting, value ) DBWriteContactSettingDword( NULL, __INTERNAL_NAME, setting, value ) -#define getTString( setting, dest ) DBGetContactSettingTString( NULL, __INTERNAL_NAME, setting, dest ) -#define setTString( setting, value ) DBWriteContactSettingTString( NULL, __INTERNAL_NAME, setting, value ) -#define deleteSetting( setting ) DBDeleteContactSetting( NULL, __INTERNAL_NAME, setting ) +#define getByte(setting, error) db_get_b(NULL, MODNAME, setting, error) +#define setByte(setting, value) db_set_b(NULL, MODNAME, setting, value) +#define getWord(setting, error) db_get_w(NULL, MODNAME, setting, error) +#define setWord(setting, value) db_set_w(NULL, MODNAME, setting, value) +#define getDword(setting, error) db_get_dw(NULL, MODNAME, setting, error) +#define setDword(setting, value) db_set_dw(NULL, MODNAME, setting, value) +#define getTString(setting, dest) db_get_ts(NULL, MODNAME, setting, dest) +#define setTString(setting, value) db_set_ts(NULL, MODNAME, setting, value) +#define deleteSetting(setting) db_unset(NULL, MODNAME, setting) // -- typedef void (__cdecl *pForAllProtosFunc)( char*, void *); @@ -385,8 +365,8 @@ struct CSWindow void __inline saveWindowPosition( HWND hwnd ) { - if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ) == TRUE ) - Utils_SaveWindowPosition(hwnd,NULL,__INTERNAL_NAME,"Position"); + if (getByte("RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION) == TRUE) + Utils_SaveWindowPosition(hwnd, NULL, MODNAME, "Position"); } }; @@ -423,13 +403,6 @@ void IitIcoLib(); void RegisterHotkeys(char buf[200], TCHAR* accName, int Number); void SetStatus(WORD code, StatusItem* item, char *protoName); -// ====[ INIT STUFF ]========================================================= - -extern "C" __declspec( dllexport ) PLUGININFOEX* MirandaPluginInfoEx( DWORD ); - -extern "C" __declspec( dllexport ) int Load(void); -extern "C" __declspec( dllexport ) int Unload( void ); - // ====[ PROCEDURES ]========================================================= INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam ); @@ -437,16 +410,4 @@ INT_PTR CALLBACK CSAMWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM INT_PTR CALLBACK CSRNWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam ); INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam ); -// ====[ HELPERS ]============================================================ - -void __fastcall SAFE_FREE(void** p) -{ - if (*p) - { - free(*p); - *p = NULL; - } -} - - #endif /* __CSLIST_H */ diff --git a/plugins/CSList/src/resource.h b/plugins/CSList/src/resource.h index 65eb286097..9d7068ac4d 100644 --- a/plugins/CSList/src/resource.h +++ b/plugins/CSList/src/resource.h @@ -13,7 +13,6 @@ #define IDI_REMOVE 124 #define IDI_FAVOURITE 125 #define IDI_UNDO 126 -#define IDI_GLOBAL 127 #define IDI_FILTER 128 #define IDI_CLOSE 129 #define IDI_UNSET 130 diff --git a/plugins/CSList/src/stdafx.cpp b/plugins/CSList/src/stdafx.cpp new file mode 100644 index 0000000000..a2d91a6a7f --- /dev/null +++ b/plugins/CSList/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 "cslist.h" \ No newline at end of file -- cgit v1.2.3