From 6f8ff613bd81e4592173e9039ec0dc6f01ce5e6b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Jun 2015 13:21:39 +0000 Subject: dbeditor++ - unified project git-svn-id: http://svn.miranda-ng.org/main/trunk@14244 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- bin10/mir_dev.sln | 2 +- bin10/mir_full.sln | 2 +- bin10/mir_full_pro.sln | 2 +- bin12/mir_dev.sln | 2 +- bin12/mir_full.sln | 2 +- plugins/DbEditorPP/dbeditorpp.sln | 29 +++ plugins/DbEditorPP/dbeditorpp.vcxproj | 28 +++ plugins/DbEditorPP/dbeditorpp.vcxproj.filters | 4 + plugins/DbEditorPP/dbeditorpp_10.sln | 29 --- plugins/DbEditorPP/dbeditorpp_10.suo | Bin 17920 -> 0 bytes plugins/DbEditorPP/dbeditorpp_10.vcxproj | 234 ------------------ plugins/DbEditorPP/dbeditorpp_10.vcxproj.filters | 138 ----------- plugins/DbEditorPP/dbeditorpp_10.vcxproj.user | 3 - plugins/DbEditorPP/dbeditorpp_12.vcxproj | 222 ----------------- plugins/DbEditorPP/dbeditorpp_12.vcxproj.filters | 96 ------- plugins/DbEditorPP/res/resource.aps | Bin 69132 -> 0 bytes plugins/DbEditorPP/src/copymodule.cpp | 2 +- plugins/DbEditorPP/src/deletemodule.cpp | 2 +- plugins/DbEditorPP/src/exportimport.cpp | 2 +- plugins/DbEditorPP/src/findwindow.cpp | 2 +- plugins/DbEditorPP/src/headers.h | 302 ----------------------- plugins/DbEditorPP/src/icons.cpp | 2 +- plugins/DbEditorPP/src/main.cpp | 9 +- plugins/DbEditorPP/src/main_window.cpp | 2 +- plugins/DbEditorPP/src/modsettingenum.cpp | 4 +- plugins/DbEditorPP/src/moduletree.cpp | 4 +- plugins/DbEditorPP/src/options.cpp | 2 +- plugins/DbEditorPP/src/renamemodule.cpp | 2 +- plugins/DbEditorPP/src/settinglist.cpp | 27 +- plugins/DbEditorPP/src/settingsdlg.cpp | 2 +- plugins/DbEditorPP/src/stdafx.cpp | 18 -- plugins/DbEditorPP/src/stdafx.cxx | 18 ++ plugins/DbEditorPP/src/stdafx.h | 299 ++++++++++++++++++++++ plugins/DbEditorPP/src/watchedvars.cpp | 6 +- 34 files changed, 412 insertions(+), 1086 deletions(-) create mode 100644 plugins/DbEditorPP/dbeditorpp.sln create mode 100644 plugins/DbEditorPP/dbeditorpp.vcxproj create mode 100644 plugins/DbEditorPP/dbeditorpp.vcxproj.filters delete mode 100644 plugins/DbEditorPP/dbeditorpp_10.sln delete mode 100644 plugins/DbEditorPP/dbeditorpp_10.suo delete mode 100644 plugins/DbEditorPP/dbeditorpp_10.vcxproj delete mode 100644 plugins/DbEditorPP/dbeditorpp_10.vcxproj.filters delete mode 100644 plugins/DbEditorPP/dbeditorpp_10.vcxproj.user delete mode 100644 plugins/DbEditorPP/dbeditorpp_12.vcxproj delete mode 100644 plugins/DbEditorPP/dbeditorpp_12.vcxproj.filters delete mode 100644 plugins/DbEditorPP/res/resource.aps delete mode 100644 plugins/DbEditorPP/src/headers.h delete mode 100644 plugins/DbEditorPP/src/stdafx.cpp create mode 100644 plugins/DbEditorPP/src/stdafx.cxx create mode 100644 plugins/DbEditorPP/src/stdafx.h diff --git a/bin10/mir_dev.sln b/bin10/mir_dev.sln index b412dac43d..dd01d7f292 100644 --- a/bin10/mir_dev.sln +++ b/bin10/mir_dev.sln @@ -267,7 +267,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendSc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp_10.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder_10.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" EndProject diff --git a/bin10/mir_full.sln b/bin10/mir_full.sln index 1aafbcee91..29522ccc39 100644 --- a/bin10/mir_full.sln +++ b/bin10/mir_full.sln @@ -270,7 +270,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\Paste EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS_10.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp_10.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" EndProject diff --git a/bin10/mir_full_pro.sln b/bin10/mir_full_pro.sln index d58f52415d..f75b8a7dff 100644 --- a/bin10/mir_full_pro.sln +++ b/bin10/mir_full_pro.sln @@ -304,7 +304,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\Paste EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS_10.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp_10.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" EndProject diff --git a/bin12/mir_dev.sln b/bin12/mir_dev.sln index 1b981a9882..2ec807217d 100644 --- a/bin12/mir_dev.sln +++ b/bin12/mir_dev.sln @@ -274,7 +274,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendSc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp_12.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder_12.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" EndProject diff --git a/bin12/mir_full.sln b/bin12/mir_full.sln index 5cf7e3f132..ec3d56ef0e 100644 --- a/bin12/mir_full.sln +++ b/bin12/mir_full.sln @@ -274,7 +274,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\Paste EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS_12.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp_12.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" EndProject diff --git a/plugins/DbEditorPP/dbeditorpp.sln b/plugins/DbEditorPP/dbeditorpp.sln new file mode 100644 index 0000000000..13c4e417f2 --- /dev/null +++ b/plugins/DbEditorPP/dbeditorpp.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +EndProject +Global + GlobalSection(DPCodeReviewSolutionGUID) = preSolution + DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/plugins/DbEditorPP/dbeditorpp.vcxproj b/plugins/DbEditorPP/dbeditorpp.vcxproj new file mode 100644 index 0000000000..5a642b987d --- /dev/null +++ b/plugins/DbEditorPP/dbeditorpp.vcxproj @@ -0,0 +1,28 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + DbEditorPP + {9C6040B8-1173-40FA-A3DB-DE044CCD8250} + + + + + \ No newline at end of file diff --git a/plugins/DbEditorPP/dbeditorpp.vcxproj.filters b/plugins/DbEditorPP/dbeditorpp.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/DbEditorPP/dbeditorpp.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/DbEditorPP/dbeditorpp_10.sln b/plugins/DbEditorPP/dbeditorpp_10.sln deleted file mode 100644 index d5e835f441..0000000000 --- a/plugins/DbEditorPP/dbeditorpp_10.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "dbeditorpp_10.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" -EndProject -Global - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/plugins/DbEditorPP/dbeditorpp_10.suo b/plugins/DbEditorPP/dbeditorpp_10.suo deleted file mode 100644 index 7c3cabb742..0000000000 Binary files a/plugins/DbEditorPP/dbeditorpp_10.suo and /dev/null differ diff --git a/plugins/DbEditorPP/dbeditorpp_10.vcxproj b/plugins/DbEditorPP/dbeditorpp_10.vcxproj deleted file mode 100644 index d7a9902684..0000000000 --- a/plugins/DbEditorPP/dbeditorpp_10.vcxproj +++ /dev/null @@ -1,234 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - DbEditorPP - {9C6040B8-1173-40FA-A3DB-DE044CCD8250} - - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - headers.h - Level3 - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - false - $(IntDir)$(TargetName).lib - Windows - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin10\lib - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - headers.h - Level3 - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - true - false - $(IntDir)$(TargetName).lib - Windows - $(ProfileDir)..\..\bin10\lib - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Use - headers.h - Level3 - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - true - true - true - false - $(IntDir)$(TargetName).lib - Windows - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Use - headers.h - Level3 - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - true - true - true - false - $(IntDir)$(TargetName).lib - Windows - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/DbEditorPP/dbeditorpp_10.vcxproj.filters b/plugins/DbEditorPP/dbeditorpp_10.vcxproj.filters deleted file mode 100644 index 7adc2fb193..0000000000 --- a/plugins/DbEditorPP/dbeditorpp_10.vcxproj.filters +++ /dev/null @@ -1,138 +0,0 @@ - - - - - {bc4414ca-bfab-4385-a016-6239272b67ab} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {b1b3b1b6-9fe0-435d-b8ab-1715cc5e7430} - - - {adcc58df-dacb-48fe-a36b-59f8221cb71e} - h;hpp;hxx;hm;inl - - - {fb09bf3d-d973-466d-b87b-0b785885753b} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files - - - Source Files\dialogs - - - Source Files - - - Source Files\dialogs - - - - - Header Files - - - Header Files - - - Header Files - - - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/DbEditorPP/dbeditorpp_10.vcxproj.user b/plugins/DbEditorPP/dbeditorpp_10.vcxproj.user deleted file mode 100644 index 695b5c78b9..0000000000 --- a/plugins/DbEditorPP/dbeditorpp_10.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/plugins/DbEditorPP/dbeditorpp_12.vcxproj b/plugins/DbEditorPP/dbeditorpp_12.vcxproj deleted file mode 100644 index 700752fe80..0000000000 --- a/plugins/DbEditorPP/dbeditorpp_12.vcxproj +++ /dev/null @@ -1,222 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - DbEditorPP - {9C6040B8-1173-40FA-A3DB-DE044CCD8250} - - - - DynamicLibrary - MultiByte - true - v120_xp - - - DynamicLibrary - MultiByte - true - v120_xp - - - DynamicLibrary - MultiByte - v120_xp - - - DynamicLibrary - MultiByte - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - headers.h - Level4 - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - false - $(IntDir)$(TargetName).lib - Windows - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin12\lib - false - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - headers.h - Level4 - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - true - false - $(IntDir)$(TargetName).lib - Windows - $(ProfileDir)..\..\bin12\lib - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Use - headers.h - Level4 - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - true - true - true - false - $(IntDir)$(TargetName).lib - Windows - $(ProfileDir)..\..\bin12\lib - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Use - headers.h - Level4 - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - shlwapi.lib;comctl32.lib;%(AdditionalDependencies) - true - true - true - false - $(IntDir)$(TargetName).lib - Windows - $(ProfileDir)..\..\bin12\lib - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/DbEditorPP/dbeditorpp_12.vcxproj.filters b/plugins/DbEditorPP/dbeditorpp_12.vcxproj.filters deleted file mode 100644 index 8b6ce891ed..0000000000 --- a/plugins/DbEditorPP/dbeditorpp_12.vcxproj.filters +++ /dev/null @@ -1,96 +0,0 @@ - - - - - {bc4414ca-bfab-4385-a016-6239272b67ab} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {8ba4deb9-307a-4c99-9c87-2243a0ef802e} - - - {b1b3b1b6-9fe0-435d-b8ab-1715cc5e7430} - - - {adcc58df-dacb-48fe-a36b-59f8221cb71e} - h;hpp;hxx;hm;inl - - - {fb09bf3d-d973-466d-b87b-0b785885753b} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files\ModSetting Enuming - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files\dialogs - - - Source Files - - - - - Source Files\ModSetting Enuming - - - Header Files - - - Header Files - - - Header Files - - - - - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/DbEditorPP/res/resource.aps b/plugins/DbEditorPP/res/resource.aps deleted file mode 100644 index 51087305fd..0000000000 Binary files a/plugins/DbEditorPP/res/resource.aps and /dev/null differ diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index cd88af3515..12e68246c5 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" void copyModule(const char *module, MCONTACT hContactFrom, MCONTACT hContactTo) { diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp index 98d4075949..c7625ad235 100644 --- a/plugins/DbEditorPP/src/deletemodule.cpp +++ b/plugins/DbEditorPP/src/deletemodule.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" volatile BOOL working; static HWND hwnd2Delete = NULL; diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 61278154f4..37fc728f24 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" TCHAR *GetFilter() diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 3e65b5c02c..235cf0f6ea 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" diff --git a/plugins/DbEditorPP/src/headers.h b/plugins/DbEditorPP/src/headers.h deleted file mode 100644 index 3f8c5b6c1a..0000000000 --- a/plugins/DbEditorPP/src/headers.h +++ /dev/null @@ -1,302 +0,0 @@ -#ifndef _COMMONHEADERS_H -#define _COMMONHEADERS_H -//===================================================== -// Includes -//===================================================== - -#define _CRT_SECURE_NO_WARNINGS -#define _CRT_NONSTDC_NO_DEPRECATE - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "m_toptoolbar.h" - -#include "resource.h" -#include "Version.h" - - -//======================================================= -// Definitions -//======================================================= -#define modname "DBEditorpp" -#define modFullname "Database Editor++" - -#define msg(a) MessageBox(hwnd2mainWindow,a,_A2T(modFullname),MB_OK) -#define dlg(a,b) MessageBox(hwnd2mainWindow,a,_A2T(modFullname),b) - -#define FLD_SIZE 256 -#define MSG_SIZE 256 -#define NAME_SIZE 128 - -#define WM_FINDITEM (WM_USER + 1) // onyl for the main window, wparam is ItemIfno* lparam is 0 - - -/*********************** - ModuleTreeInfoStruct - this gets dumped as the lparam for each module tree item - ************************/ - -// types -#define CONTACT_ROOT_ITEM 0 -#define CONTACT 1 -#define MODULE 2 -#define STUB 4 -#define EMPTY 8 - - -struct ModuleTreeInfoStruct { - int type; // from above types - MCONTACT hContact; -}; - - -struct SettingListInfo { - MCONTACT hContact; - int selectedItem; // item that is currently selected - char module[FLD_SIZE]; - // for edit - HWND hwnd2Edit; - char setting[FLD_SIZE]; - int subitem; -}; - - -struct DBsetting { - MCONTACT hContact; - char *module; - char *setting; - DBVARIANT dbv; -}; - - -typedef struct { - char module[FLD_SIZE]; - MCONTACT hContact; -} ModuleAndContact; - -// find window -#define FW_MODULE 0 -#define FW_SETTINGNAME 1 -#define FW_SETTINGVALUE 2 - -typedef struct { - int type; // above types - MCONTACT hContact; - char module[FLD_SIZE]; - char setting[FLD_SIZE]; -} ItemInfo; - -// watchwindow -struct WatchListArrayStruct { - struct DBsetting *item; // gotta malloc this - int count; - int size; -}; - -// module setting enum -struct ModSetLinkLinkItem -{ - char *name; - ModSetLinkLinkItem *next; -}; - -struct ModuleSettingLL -{ - ModSetLinkLinkItem *first; - ModSetLinkLinkItem *last; -}; - -struct ColumnsSettings { - TCHAR *name; - int index; - char *dbname; - int defsize; -}; - -struct ColumnsSortParams { - HWND hList; - int column; - int last; -}; - - -enum ICONS { - IMAGE_EMPTY, - IMAGE_BINARY, - IMAGE_BYTE, - IMAGE_WORD, - IMAGE_DWORD, - IMAGE_STRING, - IMAGE_UNICODE, - IMAGE_HANDLE, - IMAGE_SETTINGS, - IMAGE_CLOSED, - IMAGE_OPENED, - IMAGE_CONTACTS, - IMAGE_ONLINE, - IMAGE_OFFLINE -}; - - -//======================================================= -// Variables -//======================================================= -extern HINSTANCE hInst; - -extern HWND hwnd2mainWindow; - -extern int g_Mode; -extern int g_Hex; -extern int g_Order; -extern int g_Inline; - -extern MCONTACT hRestore; - -extern MIDatabase *g_db; - -extern BOOL bServiceMode; -extern BOOL usePopups; - -#define NAMEORDERCOUNT 8 - -#define MODE_UNLOADED 1 -#define MODE_LOADED 2 -#define MODE_ALL 3 - -#define HEX_BYTE 1 -#define HEX_WORD 2 -#define HEX_DWORD 4 - -#ifdef _UNICODE - #define GetValue(a,b,c,d,e) GetValueW(a,b,c,d,e) -#else - #define GetValue(a,b,c,d,e) GetValueA(a,b,c,d,e) -#endif - -//main -char *StringFromBlob(BYTE *blob, WORD len); -int WriteBlobFromString(MCONTACT hContact, const char *module, const char *setting, const char *value, int len); -TCHAR *DBVType(BYTE type); -DWORD getNumericValue(DBVARIANT *dbv); -int setNumericValue(MCONTACT hContact, const char *module, const char *setting, DWORD value, int type); -int IsRealUnicode(TCHAR *value); -int setTextValue(MCONTACT hContact, const char *module, const char *setting, TCHAR *value, int type); -int GetValueA(MCONTACT hContact, const char *module, const char *setting, char *value, int length); -int GetValueW(MCONTACT hContact, const char *module, const char *setting, WCHAR *value, int length); -int GetContactName(MCONTACT hContact, const char *proto, TCHAR *value, int maxlen); -int ApplyProtoFilter(MCONTACT hContact); -void loadListSettings(HWND hwnd, ColumnsSettings *cs); -void saveListSettings(HWND hwnd, ColumnsSettings *cs); -INT_PTR CALLBACK ColumnsCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam); - -// main_window -void openMainWindow(); - -// deletemodules -int deleteModule(MCONTACT hContact, const char *module, int confirm); -void deleteModuleDlg(); - -// renamemodule -int renameModule(MCONTACT hContact, const char *oldName, const char *newName); -void renameModuleDlg(); -void addModuleDlg(MCONTACT hContact); - -// moduletree -void insertItem(MCONTACT hContact, const char *module, HTREEITEM hParent); -HTREEITEM findItemInTree(MCONTACT hContact, const char *module); -void replaceTreeItem(MCONTACT hContact, const char *module, const char *newModule); -void refreshTree(BOOL restore); -void freeTree(MCONTACT hContact); - -// settinglist -int ListView_GetItemTextA(HWND hwndLV, int i, int iSubItem, char *pszText, int cchTextMax); -int ListView_SetItemTextA(HWND hwndLV, int i, int iSubItem, const char *pszText); -void ClearListView(); -void DeleteSettingsFromList(MCONTACT hContact, const char *module, const char *setting); -void addListHandle(MCONTACT hContact); -void PopulateSettings(MCONTACT hContact, const char *module); -void SelectSetting(const char *setting); -void settingChanged(MCONTACT hContact, const char *module, const char *setting, DBVARIANT *dbv); - -// settingsdlg -void editSetting(MCONTACT hContact, const char *module, const char *setting); -void copySetting(MCONTACT hContact, const char *module, const char *setting); -void newSetting(MCONTACT hContact, const char *module, int type); - -// exportimport -void exportDB(MCONTACT hContact, const char *module); // hContact == -1 export entire db. module == NULL export entire contact -void ImportSettingsMenuItem(MCONTACT hContact); -void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *filePath); // ansi! - -// find window -void newFindWindow(); - -// copymodule -void copyModuleMenuItem(MCONTACT hContact, const char *module); -void copyModule(const char *module, MCONTACT hContactFrom, MCONTACT hContactTo); -int CloneContact(MCONTACT hContact); - -// options -int OptInit(WPARAM wParam, LPARAM lParam); - -// watchedvars -int WatchedArrayIndex(MCONTACT hContact, const char *module, const char *setting, int strict); -int addSettingToWatchList(MCONTACT hContact, const char *module, const char *setting); -void freeWatchListItem(int item); -void PopulateWatchedWindow(); -void freeAllWatches(); -void openWatchedVarWindow(); -void popupWatchedVar(MCONTACT hContact, const char *module, const char *setting); - -// modsettingenum -int EnumModules(ModuleSettingLL *msll); -int EnumSettings(MCONTACT hContact, const char *module, ModuleSettingLL *msll); -void FreeModuleSettingLL(ModuleSettingLL *msll); -int IsModuleEmpty(MCONTACT hContact, const char *module); -int LoadResidentSettings(); -void FreeResidentSettings(); -int IsResidentSetting(const char *module, const char *setting); -int EnumResidentSettings(const char *module, ModuleSettingLL *msll); -int EnumResidentModules(ModuleSettingLL *msll); -int fixResidentSettings(); - -// icons -HANDLE GetIcoLibHandle(int icon); -void IcoLibRegister(); -HICON LoadSkinnedDBEIcon(int icon); -HIMAGELIST LoadIcons(); -int GetProtoIconIndex(const char *proto); - -#endif //_COMMONHEADERS_H diff --git a/plugins/DbEditorPP/src/icons.cpp b/plugins/DbEditorPP/src/icons.cpp index 9492738125..e29a84d89d 100644 --- a/plugins/DbEditorPP/src/icons.cpp +++ b/plugins/DbEditorPP/src/icons.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" int dbeIcons[] = { diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index 5a4e023bd8..0ddb715f5d 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" HINSTANCE hInst = NULL; @@ -15,6 +15,8 @@ MCONTACT hRestore; extern HWND hwnd2watchedVarsWindow; +#pragma comment(lib, "shlwapi.lib") + //======================== // MirandaPluginInfo //======================== @@ -320,12 +322,9 @@ int setNumericValue(MCONTACT hContact, const char *module, const char *setting, int IsRealUnicode(TCHAR *value) { -#ifdef _UNICODE BOOL nonascii = 0; WideCharToMultiByte(Langpack_GetDefaultCodePage(), WC_NO_BEST_FIT_CHARS, value, -1, NULL, 0, NULL, &nonascii); return nonascii; -#endif - return 0; } @@ -496,7 +495,7 @@ int GetContactName(MCONTACT hContact, const char *proto, TCHAR *value, int maxle GetValue(hContact, szProto, "FirstName", name, SIZEOF(name)); - int len = mir_tstrlen(name); + int len = (int)mir_tstrlen(name); if (len + 2 < SIZEOF(name)) { if (len) mir_tstrncat(name, _T(" "), SIZEOF(name)); diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp index ea5f75dc60..d7bf3bbaa0 100644 --- a/plugins/DbEditorPP/src/main_window.cpp +++ b/plugins/DbEditorPP/src/main_window.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" HWND hwnd2mainWindow; diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp index 332df43032..b6d90ff1b1 100644 --- a/plugins/DbEditorPP/src/modsettingenum.cpp +++ b/plugins/DbEditorPP/src/modsettingenum.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" void FreeModuleSettingLL(ModuleSettingLL *msll) @@ -168,7 +168,7 @@ int EnumResidentSettings(const char *module, ModuleSettingLL *msll) if (!m_lResidentSettings.getCount()) return 0; if (m_lResidentModules.getIndex((char*)module) == -1) return 0; - int len = mir_strlen(module); + int len = (int)mir_strlen(module); int cnt = 0; for (int i = 0; i < m_lResidentSettings.getCount(); i++) { diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index 5aaf0b7616..1611cd0c71 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" HWND hwnd2Tree = 0; @@ -37,7 +37,7 @@ int doContacts(HTREEITEM contactsRoot, ModuleSettingLL *modlist, MCONTACT hSelec HTREEITEM contact; ModuleTreeInfoStruct *lParam; int itemscount = 0; - int i = 0, icon = 0; + int icon = 0; HTREEITEM hItem = 0; SetWindowText(hwnd2mainWindow, TranslateT("Loading contacts...")); diff --git a/plugins/DbEditorPP/src/options.cpp b/plugins/DbEditorPP/src/options.cpp index d53cd27050..3736751f94 100644 --- a/plugins/DbEditorPP/src/options.cpp +++ b/plugins/DbEditorPP/src/options.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/DbEditorPP/src/renamemodule.cpp b/plugins/DbEditorPP/src/renamemodule.cpp index fca6c7d3cc..000f283c3a 100644 --- a/plugins/DbEditorPP/src/renamemodule.cpp +++ b/plugins/DbEditorPP/src/renamemodule.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" int renameModule(MCONTACT hContact, const char *oldName, const char *newName) diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index f815ebbbbf..015971a737 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" SettingListInfo info = {0}; @@ -242,37 +242,32 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident break; case DBVT_ASCIIZ: - { lvi.iImage = IMAGE_STRING; ListView_SetItem(hwnd2List, &lvi); ListView_SetItemTextA(hwnd2List, index, 1, dbv->pszVal); - length = mir_strlen(dbv->pszVal) + 1; + length = (int)mir_strlen(dbv->pszVal) + 1; mir_sntprintf(data, _T("0x%04X (%u)"), length, length); ListView_SetItemText(hwnd2List, index, 3, data); break; - } + case DBVT_WCHAR: - { lvi.iImage = IMAGE_UNICODE; ListView_SetItem(hwnd2List, &lvi); - length = mir_wstrlen(dbv->pwszVal) + 1; - ptrT str(mir_u2t(dbv->pwszVal)); - ListView_SetItemText(hwnd2List, index, 1, str); + length = (int)mir_wstrlen(dbv->pwszVal) + 1; + ListView_SetItemText(hwnd2List, index, 1, dbv->pwszVal); mir_sntprintf(data, _T("0x%04X (%u)"), length, length); ListView_SetItemText(hwnd2List, index, 3, data); break; - } + case DBVT_UTF8: - { lvi.iImage = IMAGE_UNICODE; ListView_SetItem(hwnd2List, &lvi); - length = mir_strlen(dbv->pszVal) + 1; - ptrT str(mir_utf8decodeT(dbv->pszVal)); - ListView_SetItemText(hwnd2List, index, 1, str); + length = (int)mir_strlen(dbv->pszVal) + 1; + ListView_SetItemText(hwnd2List, index, 1, ptrT(mir_utf8decodeT(dbv->pszVal))); mir_sntprintf(data, _T("0x%04X (%u)"), length, length); ListView_SetItemText(hwnd2List, index, 3, data); break; - } + case DBVT_DELETED: // ListView_DeleteItem(hwnd2List, index); return; @@ -490,7 +485,7 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd, UINT msg, WPARAM int i = 0; if (dbv.type == DBVT_BLOB) { - res = WriteBlobFromString(info.hContact, info.module, info.setting, szValue, mir_strlen(szValue)); + res = WriteBlobFromString(info.hContact, info.module, info.setting, szValue, (int)mir_strlen(szValue)); break; } @@ -556,7 +551,7 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd, UINT msg, WPARAM case _T('\"'): case _T('\''): { - int nlen = mir_tstrlen(value); + size_t nlen = mir_tstrlen(value); int sh = 0; if (nlen > 3) { if (value[nlen - 1] == value[0]) { diff --git a/plugins/DbEditorPP/src/settingsdlg.cpp b/plugins/DbEditorPP/src/settingsdlg.cpp index 334e1c8a80..246678306d 100644 --- a/plugins/DbEditorPP/src/settingsdlg.cpp +++ b/plugins/DbEditorPP/src/settingsdlg.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" int saveAsType(HWND hwnd, int original) { diff --git a/plugins/DbEditorPP/src/stdafx.cpp b/plugins/DbEditorPP/src/stdafx.cpp deleted file mode 100644 index 7e0216078c..0000000000 --- a/plugins/DbEditorPP/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 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/DbEditorPP/src/stdafx.cxx b/plugins/DbEditorPP/src/stdafx.cxx new file mode 100644 index 0000000000..0c766ea07f --- /dev/null +++ b/plugins/DbEditorPP/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 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 "stdafx.h" diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h new file mode 100644 index 0000000000..d1827fb6c1 --- /dev/null +++ b/plugins/DbEditorPP/src/stdafx.h @@ -0,0 +1,299 @@ +#ifndef _COMMONHEADERS_H +#define _COMMONHEADERS_H +//===================================================== +// Includes +//===================================================== + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "m_toptoolbar.h" + +#include "resource.h" +#include "Version.h" + + +//======================================================= +// Definitions +//======================================================= +#define modname "DBEditorpp" +#define modFullname "Database Editor++" + +#define msg(a) MessageBox(hwnd2mainWindow,a,_A2T(modFullname),MB_OK) +#define dlg(a,b) MessageBox(hwnd2mainWindow,a,_A2T(modFullname),b) + +#define FLD_SIZE 256 +#define MSG_SIZE 256 +#define NAME_SIZE 128 + +#define WM_FINDITEM (WM_USER + 1) // onyl for the main window, wparam is ItemIfno* lparam is 0 + + +/*********************** + ModuleTreeInfoStruct + this gets dumped as the lparam for each module tree item + ************************/ + +// types +#define CONTACT_ROOT_ITEM 0 +#define CONTACT 1 +#define MODULE 2 +#define STUB 4 +#define EMPTY 8 + + +struct ModuleTreeInfoStruct { + int type; // from above types + MCONTACT hContact; +}; + + +struct SettingListInfo { + MCONTACT hContact; + int selectedItem; // item that is currently selected + char module[FLD_SIZE]; + // for edit + HWND hwnd2Edit; + char setting[FLD_SIZE]; + int subitem; +}; + + +struct DBsetting { + MCONTACT hContact; + char *module; + char *setting; + DBVARIANT dbv; +}; + + +typedef struct { + char module[FLD_SIZE]; + MCONTACT hContact; +} ModuleAndContact; + +// find window +#define FW_MODULE 0 +#define FW_SETTINGNAME 1 +#define FW_SETTINGVALUE 2 + +typedef struct { + int type; // above types + MCONTACT hContact; + char module[FLD_SIZE]; + char setting[FLD_SIZE]; +} ItemInfo; + +// watchwindow +struct WatchListArrayStruct { + struct DBsetting *item; // gotta malloc this + int count; + int size; +}; + +// module setting enum +struct ModSetLinkLinkItem +{ + char *name; + ModSetLinkLinkItem *next; +}; + +struct ModuleSettingLL +{ + ModSetLinkLinkItem *first; + ModSetLinkLinkItem *last; +}; + +struct ColumnsSettings { + TCHAR *name; + int index; + char *dbname; + int defsize; +}; + +struct ColumnsSortParams { + HWND hList; + int column; + int last; +}; + + +enum ICONS { + IMAGE_EMPTY, + IMAGE_BINARY, + IMAGE_BYTE, + IMAGE_WORD, + IMAGE_DWORD, + IMAGE_STRING, + IMAGE_UNICODE, + IMAGE_HANDLE, + IMAGE_SETTINGS, + IMAGE_CLOSED, + IMAGE_OPENED, + IMAGE_CONTACTS, + IMAGE_ONLINE, + IMAGE_OFFLINE +}; + + +//======================================================= +// Variables +//======================================================= +extern HINSTANCE hInst; + +extern HWND hwnd2mainWindow; + +extern int g_Mode; +extern int g_Hex; +extern int g_Order; +extern int g_Inline; + +extern MCONTACT hRestore; + +extern MIDatabase *g_db; + +extern BOOL bServiceMode; +extern BOOL usePopups; + +#define NAMEORDERCOUNT 8 + +#define MODE_UNLOADED 1 +#define MODE_LOADED 2 +#define MODE_ALL 3 + +#define HEX_BYTE 1 +#define HEX_WORD 2 +#define HEX_DWORD 4 + +#ifdef _UNICODE + #define GetValue(a,b,c,d,e) GetValueW(a,b,c,d,e) +#else + #define GetValue(a,b,c,d,e) GetValueA(a,b,c,d,e) +#endif + +//main +char *StringFromBlob(BYTE *blob, WORD len); +int WriteBlobFromString(MCONTACT hContact, const char *module, const char *setting, const char *value, int len); +TCHAR *DBVType(BYTE type); +DWORD getNumericValue(DBVARIANT *dbv); +int setNumericValue(MCONTACT hContact, const char *module, const char *setting, DWORD value, int type); +int IsRealUnicode(TCHAR *value); +int setTextValue(MCONTACT hContact, const char *module, const char *setting, TCHAR *value, int type); +int GetValueA(MCONTACT hContact, const char *module, const char *setting, char *value, int length); +int GetValueW(MCONTACT hContact, const char *module, const char *setting, WCHAR *value, int length); +int GetContactName(MCONTACT hContact, const char *proto, TCHAR *value, int maxlen); +int ApplyProtoFilter(MCONTACT hContact); +void loadListSettings(HWND hwnd, ColumnsSettings *cs); +void saveListSettings(HWND hwnd, ColumnsSettings *cs); +INT_PTR CALLBACK ColumnsCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam); + +// main_window +void openMainWindow(); + +// deletemodules +int deleteModule(MCONTACT hContact, const char *module, int confirm); +void deleteModuleDlg(); + +// renamemodule +int renameModule(MCONTACT hContact, const char *oldName, const char *newName); +void renameModuleDlg(); +void addModuleDlg(MCONTACT hContact); + +// moduletree +void insertItem(MCONTACT hContact, const char *module, HTREEITEM hParent); +HTREEITEM findItemInTree(MCONTACT hContact, const char *module); +void replaceTreeItem(MCONTACT hContact, const char *module, const char *newModule); +void refreshTree(BOOL restore); +void freeTree(MCONTACT hContact); + +// settinglist +int ListView_GetItemTextA(HWND hwndLV, int i, int iSubItem, char *pszText, int cchTextMax); +int ListView_SetItemTextA(HWND hwndLV, int i, int iSubItem, const char *pszText); +void ClearListView(); +void DeleteSettingsFromList(MCONTACT hContact, const char *module, const char *setting); +void addListHandle(MCONTACT hContact); +void PopulateSettings(MCONTACT hContact, const char *module); +void SelectSetting(const char *setting); +void settingChanged(MCONTACT hContact, const char *module, const char *setting, DBVARIANT *dbv); + +// settingsdlg +void editSetting(MCONTACT hContact, const char *module, const char *setting); +void copySetting(MCONTACT hContact, const char *module, const char *setting); +void newSetting(MCONTACT hContact, const char *module, int type); + +// exportimport +void exportDB(MCONTACT hContact, const char *module); // hContact == -1 export entire db. module == NULL export entire contact +void ImportSettingsMenuItem(MCONTACT hContact); +void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *filePath); // ansi! + +// find window +void newFindWindow(); + +// copymodule +void copyModuleMenuItem(MCONTACT hContact, const char *module); +void copyModule(const char *module, MCONTACT hContactFrom, MCONTACT hContactTo); +int CloneContact(MCONTACT hContact); + +// options +int OptInit(WPARAM wParam, LPARAM lParam); + +// watchedvars +int WatchedArrayIndex(MCONTACT hContact, const char *module, const char *setting, int strict); +int addSettingToWatchList(MCONTACT hContact, const char *module, const char *setting); +void freeWatchListItem(int item); +void PopulateWatchedWindow(); +void freeAllWatches(); +void openWatchedVarWindow(); +void popupWatchedVar(MCONTACT hContact, const char *module, const char *setting); + +// modsettingenum +int EnumModules(ModuleSettingLL *msll); +int EnumSettings(MCONTACT hContact, const char *module, ModuleSettingLL *msll); +void FreeModuleSettingLL(ModuleSettingLL *msll); +int IsModuleEmpty(MCONTACT hContact, const char *module); +int LoadResidentSettings(); +void FreeResidentSettings(); +int IsResidentSetting(const char *module, const char *setting); +int EnumResidentSettings(const char *module, ModuleSettingLL *msll); +int EnumResidentModules(ModuleSettingLL *msll); +int fixResidentSettings(); + +// icons +HANDLE GetIcoLibHandle(int icon); +void IcoLibRegister(); +HICON LoadSkinnedDBEIcon(int icon); +HIMAGELIST LoadIcons(); +int GetProtoIconIndex(const char *proto); + +#endif //_COMMONHEADERS_H diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index 3b4f9a3c9b..b9bc71cefd 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" HWND hwnd2watchedVarsWindow = NULL; @@ -372,14 +372,10 @@ void popupWatchedVar(MCONTACT hContact, const char *module, const char *setting) int timeout = db_get_b(NULL, modname, "PopupDelay", 3); TCHAR name[NAME_SIZE], text[MAX_SECONDLINE], value[MAX_SECONDLINE]; - int res = 0; - GetContactName(hContact, NULL, name, SIZEOF(name)); // 2nd line int type = GetValue(hContact, module, setting, value, SIZEOF(value)); -// if (!type) value = _T("NULL"); - mir_sntprintf(text, TranslateT("Database Setting Changed: \nModule: \"%s\", Setting: \"%s\"\nNew Value (%s): \"%s\""), _A2T(module), _A2T(setting), DBVType(type), value); POPUPDATAT ppd = { 0 }; -- cgit v1.2.3