Origial James Hoo mod to 16.04

This commit is contained in:
shunf4
2024-04-20 18:55:53 +08:00
parent 603abd5528
commit eaa3e8b48c
86 changed files with 55401 additions and 185 deletions

164
7zAll/7zAll.sln Normal file
View File

@@ -0,0 +1,164 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "..\CPP\7zip\Bundles\Format7zF\Format7z.vcproj", "{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXCon", "..\CPP\7zip\Bundles\SFXCon\SFXCon.vcproj", "{0A87F1E0-6E9A-452C-A209-3968AD375DCA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXWin", "..\CPP\7zip\Bundles\SFXWin\SFXWin.vcproj", "{F0A92034-14AA-4347-92D5-CD4886865506}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\CPP\7zip\UI\Console\Console.vcproj", "{1A8E1EC5-A03F-4368-ABDF-57C21762F528}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Explorer", "..\CPP\7zip\UI\Explorer\Explorer.vcproj", "{FBA8DA13-7434-409C-83AB-FC6682A8869D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FM", "..\CPP\7zip\UI\FileManager\FM.vcproj", "{2628FF64-E1E1-4CB7-B588-08DE7145B630}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI", "..\CPP\7zip\UI\GUI\GUI.vcproj", "{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DebugU|Win32 = DebugU|Win32
DebugU|x64 = DebugU|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
ReleaseD|Win32 = ReleaseD|Win32
ReleaseD|x64 = ReleaseD|x64
ReleaseU|Win32 = ReleaseU|Win32
ReleaseU|x64 = ReleaseU|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.ActiveCfg = Debug|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.Build.0 = Debug|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.ActiveCfg = Debug|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.Build.0 = Debug|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.DebugU|Win32.ActiveCfg = Debug|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.DebugU|x64.ActiveCfg = Debug|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.DebugU|x64.Build.0 = Debug|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.ActiveCfg = Release|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.Build.0 = Release|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.ActiveCfg = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.Build.0 = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseD|Win32.ActiveCfg = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseD|x64.ActiveCfg = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseD|x64.Build.0 = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseU|Win32.ActiveCfg = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseU|x64.ActiveCfg = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.ReleaseU|x64.Build.0 = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.ActiveCfg = Debug|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.Build.0 = Debug|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.ActiveCfg = Debug|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.Build.0 = Debug|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.DebugU|Win32.ActiveCfg = Debug|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.DebugU|x64.ActiveCfg = Debug|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.DebugU|x64.Build.0 = Debug|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.ActiveCfg = Release|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.Build.0 = Release|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.ActiveCfg = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.Build.0 = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseD|Win32.ActiveCfg = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseD|x64.ActiveCfg = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseD|x64.Build.0 = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseU|Win32.ActiveCfg = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseU|x64.ActiveCfg = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.ReleaseU|x64.Build.0 = Release|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.ActiveCfg = Debug|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.Build.0 = Debug|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.ActiveCfg = Debug|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.Build.0 = Debug|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.DebugU|Win32.ActiveCfg = Debug|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.DebugU|x64.ActiveCfg = Debug|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.DebugU|x64.Build.0 = Debug|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.ActiveCfg = Release|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.Build.0 = Release|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.ActiveCfg = Release|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.Build.0 = Release|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.ActiveCfg = ReleaseD|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.Build.0 = ReleaseD|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.ActiveCfg = ReleaseD|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.Build.0 = ReleaseD|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseU|Win32.ActiveCfg = ReleaseD|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseU|x64.ActiveCfg = ReleaseD|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseU|x64.Build.0 = ReleaseD|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.ActiveCfg = Debug|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.Build.0 = Debug|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.ActiveCfg = Debug|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.Build.0 = Debug|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.ActiveCfg = DebugU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.Build.0 = DebugU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.ActiveCfg = DebugU|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.Build.0 = DebugU|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.ActiveCfg = Release|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.Build.0 = Release|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.ActiveCfg = Release|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.Build.0 = Release|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseD|Win32.ActiveCfg = Release|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseD|x64.ActiveCfg = Release|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseD|x64.Build.0 = Release|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.Build.0 = ReleaseU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.ActiveCfg = Debug|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.Build.0 = Debug|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.ActiveCfg = Debug|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.Build.0 = Debug|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.ActiveCfg = DebugU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.Build.0 = DebugU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.ActiveCfg = DebugU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.Build.0 = DebugU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.ActiveCfg = Release|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.Build.0 = Release|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.ActiveCfg = Release|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.Build.0 = Release|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseD|Win32.ActiveCfg = ReleaseU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseD|x64.ActiveCfg = ReleaseU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseD|x64.Build.0 = ReleaseU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.Build.0 = ReleaseU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.ActiveCfg = Debug|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.Build.0 = Debug|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.ActiveCfg = Debug|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.Build.0 = Debug|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.ActiveCfg = DebugU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.Build.0 = DebugU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.ActiveCfg = DebugU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.Build.0 = DebugU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.ActiveCfg = Release|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.Build.0 = Release|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.ActiveCfg = Release|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.Build.0 = Release|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseD|Win32.ActiveCfg = ReleaseU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseD|x64.ActiveCfg = ReleaseU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseD|x64.Build.0 = ReleaseU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.Build.0 = ReleaseU|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.ActiveCfg = Debug|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.Build.0 = Debug|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.ActiveCfg = Debug|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.Build.0 = Debug|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.ActiveCfg = DebugU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.Build.0 = DebugU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.ActiveCfg = DebugU|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.Build.0 = DebugU|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.ActiveCfg = Release|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.Build.0 = Release|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.ActiveCfg = Release|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.Build.0 = Release|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseD|Win32.ActiveCfg = Release|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseD|x64.ActiveCfg = Release|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseD|x64.Build.0 = Release|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.Build.0 = ReleaseU|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -3,6 +3,14 @@
#define MY_VER_BUILD 0
#define MY_VERSION_NUMBERS "16.04"
#define MY_VERSION "16.04"
#ifdef MY_X64
#define MY_7ZIP_NAME "7-Zip [64-bit]"
#else
#define MY_7ZIP_NAME "7-Zip [32-bit]"
#endif
#define MY_DATE "2016-10-04"
#undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE
@@ -17,3 +25,25 @@
#endif
#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " : " MY_COPYRIGHT " : " MY_DATE
#define MY_EASY7ZIP_VER_MAJOR 0
#define MY_EASY7ZIP_VER_MINOR 1
#ifdef MY_X64
#define MY_EASY7ZIP_7ZIP "Easy 7-Zip [64-bit]"
#else
#define MY_EASY7ZIP_7ZIP "Easy 7-Zip [32-bit]"
#endif
#define MY_EASY7ZIP_VERSION "0.1.6"
#ifdef MY_X64
#define MY_EASY7ZIP_7ZIP_VERSION "Easy 7-Zip v0.1.6 [64-bit]"
#else
#define MY_EASY7ZIP_7ZIP_VERSION "Easy 7-Zip v0.1.6 [32-bit]"
#endif
#define MY_EASY7ZIP_COPYRIGHT "Portions Copyright (C) 2013-2016 James Hoo"
#define MY_EASY7ZIP_AUTHOR "James Hoo"
#define MY_EASY7ZIP_HOMEPAGE "e7z.org"
#define MY_EASY7ZIP_SPECIAL_BUILD MY_EASY7ZIP_7ZIP_VERSION " (www." MY_EASY7ZIP_HOMEPAGE ") made by " MY_EASY7ZIP_AUTHOR

View File

@@ -40,8 +40,9 @@ BEGIN \
VALUE "InternalName", intName \
VALUE "LegalCopyright", MY_COPYRIGHT \
VALUE "OriginalFilename", origName \
VALUE "ProductName", "7-Zip" \
VALUE "ProductName", MY_7ZIP_NAME \
VALUE "ProductVersion", MY_VERSION \
VALUE "SpecialBuild", MY_EASY7ZIP_SPECIAL_BUILD \
END \
END \
BLOCK "VarFileInfo" \

View File

@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7z", "Format7z.vcproj", "{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.ActiveCfg = Debug|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|Win32.Build.0 = Debug|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.ActiveCfg = Debug|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Debug|x64.Build.0 = Debug|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.ActiveCfg = Release|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|Win32.Build.0 = Release|Win32
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.ActiveCfg = Release|x64
{F8F8C92B-2749-4444-A2C9-EBBCD87E0402}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXCon", "SFXCon.vcproj", "{0A87F1E0-6E9A-452C-A209-3968AD375DCA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.ActiveCfg = Debug|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|Win32.Build.0 = Debug|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.ActiveCfg = Debug|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Debug|x64.Build.0 = Debug|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.ActiveCfg = Release|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|Win32.Build.0 = Release|Win32
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.ActiveCfg = Release|x64
{0A87F1E0-6E9A-452C-A209-3968AD375DCA}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXWin", "SFXWin.vcproj", "{F0A92034-14AA-4347-92D5-CD4886865506}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
ReleaseD|Win32 = ReleaseD|Win32
ReleaseD|x64 = ReleaseD|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.ActiveCfg = Debug|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|Win32.Build.0 = Debug|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.ActiveCfg = Debug|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.Debug|x64.Build.0 = Debug|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.ActiveCfg = Release|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|Win32.Build.0 = Release|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.ActiveCfg = Release|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.Release|x64.Build.0 = Release|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.ActiveCfg = ReleaseD|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|Win32.Build.0 = ReleaseD|Win32
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.ActiveCfg = ReleaseD|x64
{F0A92034-14AA-4347-92D5-CD4886865506}.ReleaseD|x64.Build.0 = ReleaseD|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,11 @@
MY_VERSION_INFO_APP("7z SFX", "7z.sfx")
#define xc 240
#define yc 64
#define xc 270
#define yc 75
#define bxsOpen 30
#define xsSpace 4
IDI_ICON ICON "7z.ico"
@@ -16,9 +19,13 @@ IDD_EXTRACT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
CAPTION "7-Zip self-extracting archive"
BEGIN
LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8
EDITTEXT IDC_EXTRACT_PATH, m, 21, xc - bxsDots - 12, 14, ES_AUTOHSCROLL
PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, 20, bxsDots, bys, WS_GROUP
DEFPUSHBUTTON "Extract", IDOK, bx2, by, bxs, bys, WS_GROUP
EDITTEXT IDC_EXTRACT_PATH, m, m + 12 - 1, xc - bxsDots - xsSpace - bxsOpen - xsSpace, 14, ES_AUTOHSCROLL
PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots - xsSpace - bxsOpen, m + 12 - 1, bxsDots, bys-1, WS_GROUP
PUSHBUTTON "&Open", IDC_EXTRACT_BUTTON_OPEN_PATH, xs - m - bxsOpen, m + 12 - 1, bxsOpen, bys-1, WS_GROUP
LTEXT "", IDC_STATIC_EXTRACT_FREE_SPACE, m, m + 12 + 14 + 1, xc, 8
CONTROL "O&pen output folder after extracting", IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER, MY_CHECKBOX, m, m + 12 + 14 + 1 + 8 + 6, xc, 10
DEFPUSHBUTTON "&Extract", IDOK, bx2, by, bxs, bys, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, bx1, by, bxs, bys
END

View File

@@ -59,7 +59,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#define MY_PAGE_STYLE STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
#define MY_FONT FONT 8, "MS Shell Dlg"
//#define MY_FONT FONT 8, "MS Shell Dlg"
#define MY_FONT FONT 8, "Tahoma"
#define SMALL_PAGE_SIZE_X 120

View File

@@ -17,8 +17,10 @@ static NSynchronization::CCriticalSection g_CS;
#define CS_LOCK NSynchronization::CCriticalSectionLock lock(g_CS);
static const TCHAR *kCuPrefix = TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") TEXT(STRING_PATH_SEPARATOR);
static const TCHAR *kCuFMPrefix = TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") TEXT(STRING_PATH_SEPARATOR) TEXT("FM");
static CSysString GetKeyPath(const CSysString &path) { return kCuPrefix + path; }
static CSysString GetFMKeyPath() { return kCuFMPrefix; }
static LONG OpenMainKey(CKey &key, LPCTSTR keyName)
{
@@ -30,6 +32,16 @@ static LONG CreateMainKey(CKey &key, LPCTSTR keyName)
return key.Create(HKEY_CURRENT_USER, GetKeyPath(keyName));
}
static LONG OpenFMKey(CKey &key)
{
return key.Open(HKEY_CURRENT_USER, GetFMKeyPath(), KEY_READ);
}
static LONG CreateFMKey(CKey &key)
{
return key.Create(HKEY_CURRENT_USER, GetFMKeyPath());
}
static void Key_Set_BoolPair(CKey &key, LPCTSTR name, const CBoolPair &b)
{
if (b.Def)
@@ -62,6 +74,8 @@ static const TCHAR *kElimDup = TEXT("ElimDup");
// static const TCHAR *kAltStreams = TEXT("AltStreams");
static const TCHAR *kNtSecur = TEXT("Security");
static const TCHAR *kFMCopyHistoryValueName = TEXT("CopyHistory");
void CInfo::Save() const
{
CS_LOCK
@@ -79,8 +93,15 @@ void CInfo::Save() const
Key_Set_BoolPair(key, kNtSecur, NtSecurity);
Key_Set_BoolPair(key, kShowPassword, ShowPassword);
key.RecurseDeleteKey(kPathHistory);
key.SetValue_Strings(kPathHistory, Paths);
// key.RecurseDeleteKey(kPathHistory);
// key.SetValue_Strings(kPathHistory, Paths);
key.Close();
if (CreateFMKey(key) == ERROR_SUCCESS)
{
key.SetValue_Strings(kFMCopyHistoryValueName, Paths);
key.Close();
}
}
void Save_ShowPassword(bool showPassword)
@@ -104,10 +125,12 @@ void CInfo::Load()
CS_LOCK
CKey key;
if (OpenMainKey(key, kKeyName) != ERROR_SUCCESS)
return;
// if (OpenMainKey(key, kKeyName) != ERROR_SUCCESS)
// return;
key.GetValue_Strings(kPathHistory, Paths);
if (OpenMainKey(key, kKeyName) == ERROR_SUCCESS)
{
// key.GetValue_Strings(kPathHistory, Paths);
UInt32 v;
if (key.QueryValue(kExtractMode, v) == ERROR_SUCCESS && v <= NPathMode::kAbsPaths)
{
@@ -126,6 +149,13 @@ void CInfo::Load()
// Key_Get_BoolPair(key, kAltStreams, AltStreams);
Key_Get_BoolPair(key, kNtSecur, NtSecurity);
Key_Get_BoolPair(key, kShowPassword, ShowPassword);
key.Close();
}
if (OpenFMKey(key) == ERROR_SUCCESS)
{
key.GetValue_Strings(kFMCopyHistoryValueName, Paths);
key.Close();
}
}
bool Read_ShowPassword()
@@ -373,11 +403,11 @@ void CContextMenuInfo::Save() const
void CContextMenuInfo::Load()
{
Cascaded.Val = true;
Cascaded.Val = false;
Cascaded.Def = false;
MenuIcons.Val = false;
MenuIcons.Def = false;
MenuIcons.Val = true;
MenuIcons.Def = true;
ElimDup.Val = true;
ElimDup.Def = false;

View File

@@ -31,6 +31,9 @@ namespace NExtract
void Save_ShowPassword(bool showPassword);
bool Read_ShowPassword();
void SaveOptShowPassword(bool bShow);
bool ReadOptShowPassword();
}
namespace NCompression

View File

@@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console.vcproj", "{1A8E1EC5-A03F-4368-ABDF-57C21762F528}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DebugU|Win32 = DebugU|Win32
DebugU|x64 = DebugU|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
ReleaseU|Win32 = ReleaseU|Win32
ReleaseU|x64 = ReleaseU|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.ActiveCfg = Debug|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|Win32.Build.0 = Debug|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.ActiveCfg = Debug|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Debug|x64.Build.0 = Debug|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.ActiveCfg = DebugU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|Win32.Build.0 = DebugU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.ActiveCfg = DebugU|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.DebugU|x64.Build.0 = DebugU|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.ActiveCfg = Release|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|Win32.Build.0 = Release|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.ActiveCfg = Release|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.Release|x64.Build.0 = Release|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{1A8E1EC5-A03F-4368-ABDF-57C21762F528}.ReleaseU|x64.Build.0 = ReleaseU|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Explorer", "Explorer.vcproj", "{FBA8DA13-7434-409C-83AB-FC6682A8869D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DebugU|Win32 = DebugU|Win32
DebugU|x64 = DebugU|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
ReleaseU|Win32 = ReleaseU|Win32
ReleaseU|x64 = ReleaseU|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.ActiveCfg = Debug|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|Win32.Build.0 = Debug|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.ActiveCfg = Debug|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Debug|x64.Build.0 = Debug|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.ActiveCfg = DebugU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|Win32.Build.0 = DebugU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.ActiveCfg = DebugU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.DebugU|x64.Build.0 = DebugU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.ActiveCfg = Release|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|Win32.Build.0 = Release|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.ActiveCfg = Release|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.Release|x64.Build.0 = Release|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{FBA8DA13-7434-409C-83AB-FC6682A8869D}.ReleaseU|x64.Build.0 = ReleaseU|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

File diff suppressed because it is too large Load Diff

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 110 B

View File

@@ -3,9 +3,9 @@
#ifndef __STDAFX_H
#define __STDAFX_H
// #define _WIN32_WINNT 0x0400
#define _WIN32_WINNT 0x0500
#define WINVER _WIN32_WINNT
//// #define _WIN32_WINNT 0x0400
//#define _WIN32_WINNT 0x0500
//#define WINVER _WIN32_WINNT
#include "../../../Common/Common.h"

View File

@@ -3,6 +3,6 @@
MY_VERSION_INFO_DLL("7-Zip Shell Extension", "7-zip")
#ifndef UNDER_CE
1 24 MOVEABLE PURE "7-zip.dll.manifest"
#endif
//#ifndef UNDER_CE
//1 24 MOVEABLE PURE "7-zip.dll.manifest"
//#endif

View File

@@ -0,0 +1,42 @@
// AboutEasy7ZipDialog.cpp
#include "StdAfx.h"
#include "AboutEasy7ZipDialog.h"
#include "HelpUtils.h"
static LPCWSTR kHelpTopic = L"start.htm";
bool CAboutEasy7ZipDialog::OnInit()
{
NormalizePosition();
return CModalDialog::OnInit();
}
void CAboutEasy7ZipDialog::OnHelp()
{
ShowHelpWindow(NULL, kHelpTopic);
}
bool CAboutEasy7ZipDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
{
LPCTSTR url;
switch(buttonID)
{
case IDC_ABOUT_BUTTON_EASY7ZIP_HOMEPAGE: url = TEXT("http://www.e7z.org/"); break;
default:
return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
}
#ifdef UNDER_CE
SHELLEXECUTEINFO s;
memset(&s, 0, sizeof(s));
s.cbSize = sizeof(s);
s.lpFile = url;
::ShellExecuteEx(&s);
#else
::ShellExecute(NULL, NULL, url, NULL, NULL, SW_SHOWNORMAL);
#endif
return true;
}

View File

@@ -0,0 +1,18 @@
// AboutEasy7ZipDialog.h
#ifndef __ABOUT_EASY7ZIP_DIALOG_H
#define __ABOUT_EASY7ZIP_DIALOG_H
#include "AboutEasy7ZipDialogRes.h"
#include "../../../Windows/Control/Dialog.h"
class CAboutEasy7ZipDialog: public NWindows::NControl::CModalDialog
{
public:
virtual bool OnInit();
virtual void OnHelp();
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
INT_PTR Create(HWND wndParent = 0) { return CModalDialog::Create(IDD_ABOUT_EASY_7ZIP, wndParent); }
};
#endif

View File

@@ -0,0 +1,16 @@
#include "AboutEasy7ZipDialogRes.h"
#include "../../GuiCommon.rc"
#include "../../MyVersion.h"
#define xc 165
#define yc 85
IDD_ABOUT_EASY_7ZIP DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
CAPTION "About Easy 7-Zip"
{
DEFPUSHBUTTON "OK", IDOK, bx1, by, bxs, bys
PUSHBUTTON MY_EASY7ZIP_HOMEPAGE, IDC_ABOUT_BUTTON_EASY7ZIP_HOMEPAGE, bx2, by, bxs, bys
LTEXT MY_EASY7ZIP_7ZIP_VERSION, -1, m, m, xc, 8
LTEXT MY_EASY7ZIP_COPYRIGHT, -1, m, m + 8 + 4, xc, 8
LTEXT "Easy 7-Zip is a free software made by James Hoo. The software was built based on 7-Zip 16.04.", -1, m, m + 8 + 4 + 8 + 12, xc, (yc - bys - 36)
}

View File

@@ -0,0 +1,2 @@
#define IDD_ABOUT_EASY_7ZIP 515
#define IDC_ABOUT_BUTTON_EASY7ZIP_HOMEPAGE 1001

View File

@@ -37,6 +37,8 @@ using namespace NName;
extern DWORD g_ComCtl32Version;
extern HINSTANCE g_hInstance;
extern bool g_bProcessError;
static CFSTR kTempDirPrefix = FTEXT("7zE");
void CPanelCallbackImp::OnTab()
@@ -542,6 +544,12 @@ UString CPanel::GetItemsInfoString(const CRecordVector<UInt32> &indices)
bool IsCorrectFsName(const UString &name);
static bool IsDirectory(LPCWSTR lpszPathFile)
{
DWORD dwAttr;
dwAttr = GetFileAttributesW(lpszPathFile);
return (dwAttr != (DWORD)-1) && ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) != 0);
}
/* Returns true, if path is path that can be used as path for File System functions
@@ -578,6 +586,9 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex)
CRecordVector<UInt32> indices;
UString destPath;
bool openOutputFolder;
bool deleteSourceFile;
bool close7Zip;
bool useDestPanel = false;
{
@@ -614,10 +625,15 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex)
LangString(move ? IDS_MOVE : IDS_COPY, copyDialog.Title);
LangString(move ? IDS_MOVE_TO : IDS_COPY_TO, copyDialog.Static);
copyDialog.Info = srcPanel.GetItemsInfoString(indices);
copyDialog.m_currentFolderPrefix = srcPanel._currentFolderPrefix;
if (copyDialog.Create(srcPanel.GetParent()) != IDOK)
return;
openOutputFolder = copyDialog.m_bOpenOutputFolder;
deleteSourceFile = copyDialog.m_bDeleteSourceFile;
close7Zip = copyDialog.m_bClose7Zip;
destPath = copyDialog.Value;
}
@@ -742,11 +758,13 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex)
useDestPanel = true;
AddUniqueStringToHeadOfList(copyFolders, destPath);
while (copyFolders.Size() > 20)
while (copyFolders.Size() > 30)
copyFolders.DeleteBack();
SaveCopyHistory(copyFolders);
}
g_bProcessError = false;
bool useSrcPanel = !useDestPanel || !srcPanel.Is_IO_FS_Folder();
bool useTemp = useSrcPanel && useDestPanel;
@@ -830,6 +848,62 @@ void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex)
disableNotify1.Restore();
disableNotify2.Restore();
srcPanel.SetFocusToList();
if (!g_bProcessError && result == S_OK)
{
if (openOutputFolder && IsDirectory(destPath))
{
StartApplicationDontWait(destPath, destPath, (HWND)_window);
}
if (deleteSourceFile)
{
DWORD dwAttr;
UString srcFilePath(srcPanel._currentFolderPrefix);
srcPanel.OpenParentFolder();
while (!srcFilePath.IsEmpty())
{
if (srcFilePath.Back() == '\\')
{
srcFilePath.DeleteBack();
}
dwAttr = GetFileAttributesW(srcFilePath);
if (dwAttr == INVALID_FILE_ATTRIBUTES)
{
int n = srcFilePath.ReverseFind(L'\\');
if (n != -1)
{
srcPanel.OpenParentFolder();
srcFilePath.ReleaseBuf_SetEnd(n);
}
else
{
break;
}
}
else if (dwAttr & FILE_ATTRIBUTE_ARCHIVE)
{
if (dwAttr & FILE_ATTRIBUTE_READONLY)
{
dwAttr &= (~FILE_ATTRIBUTE_READONLY);
SetFileAttributesW(srcFilePath, dwAttr);
}
::DeleteFileW(srcFilePath);
break;
}
else //if (dwAttr & FILE_ATTRIBUTE_DIRECTORY)
{
break;
}
} // while
}
if (close7Zip)
{
PostMessage (_window, WM_CLOSE, 0, 0);
}
}
}
void CApp::OnSetSameFolder(int srcPanelIndex)

View File

@@ -39,23 +39,23 @@ bool CComboDialog::OnInit()
return CModalDialog::OnInit();
}
bool CComboDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
{
int mx, my;
GetMargins(8, mx, my);
int bx1, bx2, by;
GetItemSizes(IDCANCEL, bx1, by);
GetItemSizes(IDOK, bx2, by);
int y = ySize - my - by;
int x = xSize - mx - bx1;
InvalidateRect(NULL);
MoveItem(IDCANCEL, x, y, bx1, by);
MoveItem(IDOK, x - mx - bx2, y, bx2, by);
ChangeSubWindowSizeX(_comboBox, xSize - mx * 2);
return false;
}
//bool CComboDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
//{
// int mx, my;
// GetMargins(8, mx, my);
// int bx1, bx2, by;
// GetItemSizes(IDCANCEL, bx1, by);
// GetItemSizes(IDOK, bx2, by);
// int y = ySize - my - by;
// int x = xSize - mx - bx1;
//
// InvalidateRect(NULL);
//
// MoveItem(IDCANCEL, x, y, bx1, by);
// MoveItem(IDOK, x - mx - bx2, y, bx2, by);
// ChangeSubWindowSizeX(_comboBox, xSize - mx * 2);
// return false;
//}
void CComboDialog::OnOK()
{

View File

@@ -13,7 +13,7 @@ class CComboDialog: public NWindows::NControl::CModalDialog
NWindows::NControl::CComboBox _comboBox;
virtual void OnOK();
virtual bool OnInit();
virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
// virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
public:
// bool Sorted;
UString Title;

View File

@@ -1,14 +1,14 @@
#include "ComboDialogRes.h"
#include "../../GuiCommon.rc"
#define xc 240
#define xc 260
#define yc 64
IDD_COMBO DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT
IDD_COMBO DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
CAPTION "Combo"
{
LTEXT "", IDT_COMBO, m, m, xc, 8
COMBOBOX IDC_COMBO, m, 20, xc, 65, MY_COMBO_WITH_EDIT
COMBOBOX IDC_COMBO, m, 20, xc, 160, MY_COMBO_WITH_EDIT
OK_CANCEL
}

View File

@@ -9,12 +9,31 @@
#include "BrowseDialog.h"
#include "CopyDialog.h"
#include "Panel.h"
#include "ViewSettings.h"
#ifdef LANG
#include "LangUtils.h"
#endif
using namespace NWindows;
static bool IsFileExistentAndNotDir(const wchar_t * lpszFile)
{
DWORD dwAttr;
dwAttr = GetFileAttributesW(lpszFile);
return (dwAttr != INVALID_FILE_ATTRIBUTES)
&& ((dwAttr & FILE_ATTRIBUTE_ARCHIVE) != 0)
&& ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) == 0);
}
static bool IsDirectory(LPCWSTR lpszPathFile)
{
DWORD dwAttr;
dwAttr = GetFileAttributesW(lpszPathFile);
return (dwAttr != (DWORD)-1) && ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) != 0);
}
bool CCopyDialog::OnInit()
{
#ifdef LANG
@@ -23,6 +42,9 @@ bool CCopyDialog::OnInit()
_path.Attach(GetItem(IDC_COPY));
SetText(Title);
_freeSpace.Attach(GetItem(IDC_FREE_SPACE));
_freeSpace.SetText(L"");
NControl::CStatic staticContol;
staticContol.Attach(GetItem(IDT_COPY));
staticContol.SetText(Static);
@@ -33,8 +55,70 @@ bool CCopyDialog::OnInit()
FOR_VECTOR (i, Strings)
_path.AddString(Strings[i]);
_path.SetText(Value);
ShowPathFreeSpace(Value);
m_bOpenOutputFolder = ReadOptOpenOutputFolder();
m_bClose7Zip = ReadOptClose7Zip();
CheckButton(IDC_CHECK_OPEN_OUTPUT_FOLDER, m_bOpenOutputFolder);
CheckButton(IDC_CHECK_CLOSE_7ZIP, m_bClose7Zip);
SetItemText(IDT_COPY_INFO, Info);
NormalizeSize(true);
RECT rc;
GetWindowRect(&rc);
m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*4/5;
m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*4/5;
/////////////////////////////////////////////////////////
m_strRealFileName.Empty();
if (IsDirectory(m_currentFolderPrefix))
{
EnableItem(IDC_COPY_ADD_FILE_NAME, false);
EnableItem(IDC_CHECK_DELETE_SOURCE_FILE, false);
}
else
{
while (!m_currentFolderPrefix.IsEmpty())
{
if (m_currentFolderPrefix.Back() == '\\')
{
m_currentFolderPrefix.DeleteBack();
}
if (IsFileExistentAndNotDir(m_currentFolderPrefix))
{
int n = m_currentFolderPrefix.ReverseFind(L'\\');
int m = m_currentFolderPrefix.ReverseFind(L'.');
if (n != -1)
{
n++;
}
else
{
n = 0;
}
if (m == -1 || m <= n) m = m_currentFolderPrefix.Len();
m_strRealFileName = m_currentFolderPrefix.Mid(n, m - n);
break;
}
else
{
int n = m_currentFolderPrefix.ReverseFind(L'\\');
if (n != -1)
{
m_currentFolderPrefix.ReleaseBuf_SetEnd(n);
}
else
{
break;
}
}
}
}
return CModalDialog::OnInit();
}
@@ -48,28 +132,49 @@ bool CCopyDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
int y = ySize - my - by;
int x = xSize - mx - bx1;
InvalidateRect(NULL);
// InvalidateRect(NULL);
{
RECT r;
GetClientRectOfItem(IDC_COPY_ADD_FILE_NAME, r);
int bxAddFileName = r.right - r.left;
int byAddFileName = r.bottom - r.top;
MoveItem(IDC_COPY_ADD_FILE_NAME, xSize - mx - bxAddFileName, r.top, bxAddFileName, byAddFileName, false);
GetClientRectOfItem(IDC_COPY_OPEN_PATH, r);
int bxOpen = r.right - r.left;
int byOpen = r.bottom - r.top;
MoveItem(IDC_COPY_OPEN_PATH, xSize - mx - bxOpen - mx/2 - bxAddFileName, r.top, bxOpen, byOpen, false);
GetClientRectOfItem(IDB_COPY_SET_PATH, r);
int bx = RECT_SIZE_X(r);
MoveItem(IDB_COPY_SET_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r));
ChangeSubWindowSizeX(_path, xSize - mx - mx - bx - mx);
// int bx = RECT_SIZE_X(r);
int bxSet = RECT_SIZE_X(r);
int bySet = RECT_SIZE_Y(r);
// MoveItem(IDB_COPY_SET_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r));
// ChangeSubWindowSizeX(_path, xSize - mx - mx - bx - mx);
MoveItem(IDB_COPY_SET_PATH, xSize - mx - bxSet - bxOpen - mx - bxAddFileName, r.top, bxSet, bySet, false);
ChangeSubWindowSizeX(_path, xSize - mx - mx - bxSet - bxOpen - mx - mx/2 - bxAddFileName, false);
}
{
RECT r;
GetClientRectOfItem(IDT_COPY_INFO, r);
NControl::CStatic staticContol;
staticContol.Attach(GetItem(IDT_COPY_INFO));
// NControl::CStatic staticContol;
// staticContol.Attach(GetItem(IDT_COPY_INFO));
int yPos = r.top;
staticContol.Move(mx, yPos, xSize - mx * 2, y - 2 - yPos);
int xc = xSize - mx * 2;
// staticContol.Move(mx, yPos, xSize - mx * 2, y - 2 - yPos);
MoveItem(IDT_COPY_INFO, mx, yPos, xc, y - 2 - yPos, false);
GetClientRectOfItem(IDC_AFTER_EXTRACT, r);
MoveItem(IDC_AFTER_EXTRACT, mx, r.top, xc, r.bottom-r.top, false);
}
MoveItem(IDCANCEL, x, y, bx1, by);
MoveItem(IDOK, x - mx - bx2, y, bx2, by);
MoveItem(IDCANCEL, x, y, bx1, by, false);
MoveItem(IDOK, x - mx - bx2, y, bx2, by, false);
InvalidateRect(NULL);
return false;
}
@@ -80,6 +185,25 @@ bool CCopyDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
case IDB_COPY_SET_PATH:
OnButtonSetPath();
return true;
case IDC_COPY_OPEN_PATH:
OnButtonOpenPath();
return true;
case IDC_COPY_ADD_FILE_NAME:
OnButtonAddFileName();
return true;
case IDC_CHECK_OPEN_OUTPUT_FOLDER:
m_bOpenOutputFolder = IsButtonCheckedBool(IDC_CHECK_OPEN_OUTPUT_FOLDER);
return true;
case IDC_CHECK_DELETE_SOURCE_FILE:
m_bDeleteSourceFile = IsButtonCheckedBool(IDC_CHECK_DELETE_SOURCE_FILE);
return true;
case IDC_CHECK_CLOSE_7ZIP:
m_bClose7Zip = IsButtonCheckedBool(IDC_CHECK_CLOSE_7ZIP);
return true;
}
return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
}
@@ -97,10 +221,191 @@ void CCopyDialog::OnButtonSetPath()
NFile::NName::NormalizeDirPathPrefix(resultPath);
_path.SetCurSel(-1);
_path.SetText(resultPath);
ShowPathFreeSpace(resultPath);
}
void CCopyDialog::OnOK()
{
SaveOptOpenOutputFolder(m_bOpenOutputFolder);
SaveOptClose7Zip(m_bClose7Zip);
_path.GetText(Value);
CModalDialog::OnOK();
}
void CCopyDialog::OnButtonOpenPath()
{
UString currentPath;
_path.GetText(currentPath);
if (IsDirectory(currentPath))
{
StartApplicationDontWait(currentPath, currentPath, (HWND)_window);
}
else
{
WCHAR szMsg[1024];
wsprintfW(szMsg, L"Folder \"%s\" is not available yet.\n\n"
L"Note: the program will create the folder automatically when extracting.", (LPCWSTR)currentPath);
MessageBoxW((HWND)_window, szMsg, L"7-Zip", MB_ICONEXCLAMATION);
}
}
void CCopyDialog::OnButtonAddFileName()
{
UString currentPath;
_path.GetText(currentPath);
currentPath.Trim();
if (currentPath.Back() == '\\')
{
currentPath.DeleteBack();
}
UString strLastDir;
int n = currentPath.ReverseFind(L'\\');
if (n != -1)
{
strLastDir = currentPath.Mid(n+1);
}
else
{
strLastDir = currentPath;
}
if (strLastDir != m_strRealFileName)
{
currentPath += L'\\';
currentPath += m_strRealFileName;
_path.SetText(currentPath);
}
_path.SetFocus();
}
bool CCopyDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_GETMINMAXINFO:
{
return OnGetMinMaxInfo((PMINMAXINFO)lParam);
}
}
return CModalDialog::OnMessage(message, wParam, lParam);
}
bool CCopyDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI)
{
pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx;
pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy;
return false;
}
static int MakeByteSizeString64(wchar_t * lpszBuf, size_t ccBuf, unsigned __int64 n64Byte)
{
int nRet = 0;
if (n64Byte < 1000ui64)
{
// < 1K
nRet = swprintf(lpszBuf, ccBuf,
L"%I64d B", n64Byte);
}
else if (n64Byte < 1024000ui64) // 1024 * 1000
{
// 1K <= n64Byte < 1M
nRet = swprintf(lpszBuf, ccBuf,
L"%.1f KB", (double)n64Byte / 1024.0);
}
else if (n64Byte < 1048576000ui64) // 1024 * 1024 * 1000
{
// 1M <= n64Byte < 1G
nRet = swprintf(lpszBuf, ccBuf,
L"%.2f MB", (double)n64Byte / 1048576.0); // 1024 * 1024
}
else if (n64Byte < 1073741824000ui64) // 1024 * 1024 * 1024 * 1000
{
// 1 G <= n64Byte < 1T
nRet = swprintf(lpszBuf, ccBuf,
L"%.2f GB", (double)n64Byte / 1073741824.0); // 1024.0F * 1024.0F * 1024.0F
}
else
{
// n64Byte >= 1T
nRet = swprintf(lpszBuf, ccBuf,
L"%.2f TB", (double)n64Byte / 1099511627776.0);
// 1024.0F * 1024.0F * 1024.0F * 1024.0F
}
return nRet;
}
void CCopyDialog::ShowPathFreeSpace(UString & strPath)
{
bool bBadPath;
UString strText;
strText.Empty();
bBadPath = false;
strPath.Trim();
for (; !IsDirectory(strPath); )
{
int n = strPath.ReverseFind(L'\\');
if (n == -1)
{
bBadPath = true;
break;
}
else
{
strPath.ReleaseBuf_SetEnd(n);
}
}
if (!bBadPath)
{
unsigned __int64 n64FreeBytesAvailable;
unsigned __int64 n64TotalNumberOfBytes;
unsigned __int64 n64TotalNumberOfFreeBytes;
if (GetDiskFreeSpaceExW(strPath, (PULARGE_INTEGER)&n64FreeBytesAvailable,
(PULARGE_INTEGER)&n64TotalNumberOfBytes, (PULARGE_INTEGER)&n64TotalNumberOfFreeBytes))
{
wchar_t szFreeBytes[1024];
wchar_t szTotalBytes[1024];
MakeByteSizeString64(szFreeBytes, 1024-4, n64TotalNumberOfFreeBytes);
MakeByteSizeString64(szTotalBytes, 1024-4, n64TotalNumberOfBytes);
int nLen = swprintf(strText.GetBuf(1024), 1024-4, L"%s Free (Total: %s)", szFreeBytes, szTotalBytes);
strText.ReleaseBuf_SetEnd(nLen);
}
}
_freeSpace.SetText(strText);
}
bool CCopyDialog::OnCommand(int code, int itemID, LPARAM lParam)
{
if (itemID == IDC_COPY)
{
if (code == CBN_EDITCHANGE)
{
UString strPath;
_path.GetText(strPath);
ShowPathFreeSpace(strPath);
return true;
}
else if (code == CBN_SELCHANGE)
{
int nSel = _path.GetCurSel();
if (nSel != CB_ERR)
{
UString strPath;
_path.GetLBText(nSel, strPath);
ShowPathFreeSpace(strPath);
}
return true;
}
}
return CModalDialog::OnCommand(code, itemID, lParam);
}

View File

@@ -8,24 +8,46 @@
#include "CopyDialogRes.h"
const int kCopyDialog_NumInfoLines = 11;
const int kCopyDialog_NumInfoLines = 14;
class CCopyDialog: public NWindows::NControl::CModalDialog
{
NWindows::NControl::CComboBox _path;
NWindows::NControl::CStatic _freeSpace;
virtual void OnOK();
virtual bool OnInit();
virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
void OnButtonSetPath();
void OnButtonOpenPath();
void OnButtonAddFileName();
bool OnButtonClicked(int buttonID, HWND buttonHWND);
bool OnCommand(int code, int itemID, LPARAM lParam);
bool OnGetMinMaxInfo(PMINMAXINFO pMMI);
void ShowPathFreeSpace(UString & strPath);
protected:
SIZE m_sizeMinWindow;
public:
CCopyDialog(): m_bOpenOutputFolder(false), m_bDeleteSourceFile(false), m_bClose7Zip (false) { m_sizeMinWindow.cx = 0; m_sizeMinWindow.cy = 0; }
UString Title;
UString Static;
UString Value;
UString Info;
UStringVector Strings;
bool m_bOpenOutputFolder;
bool m_bDeleteSourceFile;
bool m_bClose7Zip;
UString m_currentFolderPrefix;
UString m_strRealFileName;
INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_COPY, parentWindow); }
bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
};
#endif

View File

@@ -1,20 +1,75 @@
#include "CopyDialogRes.h"
#include "../../GuiCommon.rc"
#define xc 320
#define yc 144
//#define xc 320
//#define yc 144
//
//#define y 40
//
//IDD_COPY DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT
//CAPTION "Copy"
//{
// LTEXT "", IDT_COPY, m, m, xc, 8
// COMBOBOX IDC_COPY, m, 20, xc - bxsDots - m, 65, MY_COMBO_WITH_EDIT
// PUSHBUTTON "...", IDB_COPY_SET_PATH, xs - m - bxsDots, 18, bxsDots, bys, WS_GROUP
// LTEXT "", IDT_COPY_INFO, m, y, xc, by - y - 1, SS_NOPREFIX | SS_LEFTNOWORDWRAP
// OK_CANCEL
//}
#define y 40
#define xc 340
#define yc 190
#define y 78
#define OPEN_XS 28
#define FILENAME_XS 40
#define SPACE_XS 4
#define FILENAME_X (xs - m - FILENAME_XS)
#define OPEN_X (FILENAME_X - OPEN_XS - SPACE_XS)
#define DOTS_X (OPEN_X - bxsDots - SPACE_XS)
#define PATH_Y (m + 12)
#define PATH_XS (DOTS_X - m - SPACE_XS)
#define FREE_SPACE_Y (PATH_Y + 15)
#define AFTER_EXTRACTION_Y (FREE_SPACE_Y + 12)
#define OPTION_SPACE 10
#define OPEN_OUTPUT_FOLDER_X (m + 6)
#define OPEN_OUTPUT_FOLDER_XS 80
#define OPEN_OUTPUT_FOLDER_Y (AFTER_EXTRACTION_Y + 12)
#define DELETE_SOURCE_X (OPEN_OUTPUT_FOLDER_X + OPEN_OUTPUT_FOLDER_XS + OPTION_SPACE)
#define DELETE_SOURCE_XS 88
#define CLOSE_7ZIP_X (DELETE_SOURCE_X + DELETE_SOURCE_XS + OPTION_SPACE)
#define CLOSE_7ZIP_XS 54
#define INFO_Y (AFTER_EXTRACTION_Y + 27 + 4)
#define INFO_YS (by - m - 12 - 15 - 12 - 27 - 4 - 1)
IDD_COPY DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT
CAPTION "Copy"
{
LTEXT "", IDT_COPY, m, m, xc, 8
COMBOBOX IDC_COPY, m, 20, xc - bxsDots - m, 65, MY_COMBO_WITH_EDIT
PUSHBUTTON "...", IDB_COPY_SET_PATH, xs - m - bxsDots, 18, bxsDots, bys, WS_GROUP
LTEXT "", IDT_COPY_INFO, m, y, xc, by - y - 1, SS_NOPREFIX | SS_LEFTNOWORDWRAP
LTEXT "", IDT_COPY, m, m, xc, 9
COMBOBOX IDC_COPY, m, PATH_Y, PATH_XS, 160, MY_COMBO_WITH_EDIT
PUSHBUTTON "...", IDB_COPY_SET_PATH, DOTS_X, PATH_Y - 1, bxsDots, bys - 1, WS_GROUP
PUSHBUTTON "&Open", IDC_COPY_OPEN_PATH, OPEN_X, PATH_Y - 1, OPEN_XS, bys - 1, WS_GROUP
PUSHBUTTON "&Filename", IDC_COPY_ADD_FILE_NAME, FILENAME_X, PATH_Y - 1, FILENAME_XS, bys - 1, WS_GROUP
LTEXT "", IDC_FREE_SPACE, m, FREE_SPACE_Y, xc, 9
GROUPBOX "After extraction completes successfully", IDC_AFTER_EXTRACT, m, AFTER_EXTRACTION_Y, xc, 27
CONTROL "O&pen output folder", IDC_CHECK_OPEN_OUTPUT_FOLDER, MY_CHECKBOX, OPEN_OUTPUT_FOLDER_X, OPEN_OUTPUT_FOLDER_Y, OPEN_OUTPUT_FOLDER_XS, 10
CONTROL "&Delete source archive", IDC_CHECK_DELETE_SOURCE_FILE, MY_CHECKBOX, DELETE_SOURCE_X, OPEN_OUTPUT_FOLDER_Y, DELETE_SOURCE_XS, 10
CONTROL "&Close 7-Zip", IDC_CHECK_CLOSE_7ZIP, MY_CHECKBOX, CLOSE_7ZIP_X, OPEN_OUTPUT_FOLDER_Y, CLOSE_7ZIP_XS, 10
LTEXT "", IDT_COPY_INFO, m, INFO_Y, xc, INFO_YS, SS_NOPREFIX | SS_LEFTNOWORDWRAP
OK_CANCEL
}
#undef xc
#undef yc

View File

@@ -5,4 +5,12 @@
#define IDB_COPY_SET_PATH 102
#define IDT_COPY_INFO 103
#define IDC_CHECK_OPEN_OUTPUT_FOLDER 104
#define IDC_COPY_OPEN_PATH 105
#define IDC_FREE_SPACE 106
#define IDC_COPY_ADD_FILE_NAME 107
#define IDC_CHECK_DELETE_SOURCE_FILE 108
#define IDC_CHECK_CLOSE_7ZIP 109
#define IDC_AFTER_EXTRACT 110
#define IDS_SET_FOLDER 6007

View File

@@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FM", "FM.vcproj", "{2628FF64-E1E1-4CB7-B588-08DE7145B630}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DebugU|Win32 = DebugU|Win32
DebugU|x64 = DebugU|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
ReleaseU|Win32 = ReleaseU|Win32
ReleaseU|x64 = ReleaseU|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.ActiveCfg = Debug|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|Win32.Build.0 = Debug|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.ActiveCfg = Debug|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Debug|x64.Build.0 = Debug|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.ActiveCfg = DebugU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|Win32.Build.0 = DebugU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.ActiveCfg = DebugU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.DebugU|x64.Build.0 = DebugU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.ActiveCfg = Release|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|Win32.Build.0 = Release|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.ActiveCfg = Release|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.Release|x64.Build.0 = Release|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{2628FF64-E1E1-4CB7-B588-08DE7145B630}.ReleaseU|x64.Build.0 = ReleaseU|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

File diff suppressed because it is too large Load Diff

View File

@@ -42,6 +42,11 @@ bool CListViewDialog::OnInit()
_listView.SetColumnWidthAuto(0);
StringsWereChanged = false;
RECT rc;
GetWindowRect(&rc);
m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*3/4;
m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*3/4;
NormalizeSize();
return CModalDialog::OnInit();
}
@@ -62,15 +67,15 @@ bool CListViewDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
rect.top = y - my;
InvalidateRect(&rect);
*/
InvalidateRect(NULL);
MoveItem(IDCANCEL, x, y, bx1, by);
MoveItem(IDOK, x - mx - bx2, y, bx2, by);
MoveItem(IDCANCEL, x, y, bx1, by, false);
MoveItem(IDOK, x - mx - bx2, y, bx2, by, false);
/*
if (wParam == SIZE_MAXSHOW || wParam == SIZE_MAXIMIZED || wParam == SIZE_MAXHIDE)
mx = 0;
*/
_listView.Move(mx, my, xSize - mx * 2, y - my * 2);
_listView.Move(mx, my, xSize - mx * 2, y - my * 2, false);
InvalidateRect(NULL);
return false;
}
@@ -141,3 +146,23 @@ void CListViewDialog::OnOK()
FocusedItemIndex = _listView.GetFocusedItem();
CModalDialog::OnOK();
}
bool CListViewDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_GETMINMAXINFO:
{
return OnGetMinMaxInfo((PMINMAXINFO)lParam);
}
}
return CModalDialog::OnMessage(message, wParam, lParam);
}
bool CListViewDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI)
{
pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx;
pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy;
return false;
}

View File

@@ -15,6 +15,9 @@ class CListViewDialog: public NWindows::NControl::CModalDialog
virtual bool OnInit();
virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
virtual bool OnNotify(UINT controlID, LPNMHDR header);
bool OnGetMinMaxInfo(PMINMAXINFO pMMI);
protected:
SIZE m_sizeMinWindow;
public:
UString Title;
bool DeleteIsAllowed;
@@ -24,7 +27,8 @@ public:
INT_PTR Create(HWND wndParent = 0) { return CModalDialog::Create(IDD_LISTVIEW, wndParent); }
CListViewDialog(): DeleteIsAllowed(false) {}
CListViewDialog(): DeleteIsAllowed(false) { m_sizeMinWindow.cx = 0; m_sizeMinWindow.cy = 0; }
virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
};
#endif

View File

@@ -55,6 +55,12 @@ bool CMessagesDialog::OnInit()
_messageList.SetColumnWidthAuto(0);
_messageList.SetColumnWidthAuto(1);
RECT rc;
GetWindowRect(&rc);
m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*3/4;
m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*3/4;
NormalizeSize();
return CModalDialog::OnInit();
}
@@ -68,9 +74,28 @@ bool CMessagesDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
int y = ySize - my - by;
int x = xSize - mx - bx;
InvalidateRect(NULL);
MoveItem(IDOK, x, y, bx, by);
_messageList.Move(mx, my, xSize - mx * 2, y - my * 2);
MoveItem(IDOK, x, y, bx, by, false);
_messageList.Move(mx, my, xSize - mx * 2, y - my * 2, false);
InvalidateRect(NULL);
return false;
}
bool CMessagesDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_GETMINMAXINFO:
{
return OnGetMinMaxInfo((PMINMAXINFO)lParam);
}
}
return CModalDialog::OnMessage(message, wParam, lParam);
}
bool CMessagesDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI)
{
pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx;
pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy;
return false;
}

View File

@@ -16,10 +16,15 @@ class CMessagesDialog: public NWindows::NControl::CModalDialog
void AddMessage(LPCWSTR message);
virtual bool OnInit();
virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
bool OnGetMinMaxInfo(PMINMAXINFO pMMI);
protected:
SIZE m_sizeMinWindow;
public:
const UStringVector *Messages;
CMessagesDialog() { m_sizeMinWindow.cx = 0; m_sizeMinWindow.cy = 0; }
INT_PTR Create(HWND parent = 0) { return CModalDialog::Create(IDD_MESSAGES, parent); }
virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
};
#endif

View File

@@ -10,6 +10,7 @@
#include "../Common/CompressCall.h"
#include "AboutDialog.h"
#include "AboutEasy7ZipDialog.h"
#include "App.h"
#include "HelpUtils.h"
#include "LangUtils.h"
@@ -622,6 +623,12 @@ bool OnMenuCommand(HWND hWnd, int id)
dialog.Create(hWnd);
break;
}
case IDM_ABOUT_EASY_7ZIP:
{
CAboutEasy7ZipDialog dialog;
dialog.Create(hWnd);
break;
}
default:
{
if (id >= kOpenBookmarkMenuID && id <= kOpenBookmarkMenuID + 9)

View File

@@ -189,6 +189,7 @@ enum MyMessages
};
UString GetFolderPath(IFolderFolder *folder);
void StartApplicationDontWait(const UString &dir, const UString &path, HWND window);
class CPanel;

View File

@@ -879,7 +879,7 @@ static HRESULT StartApplication(const UString &dir, const UString &path, HWND wi
return S_OK;
}
static void StartApplicationDontWait(const UString &dir, const UString &path, HWND window)
void StartApplicationDontWait(const UString &dir, const UString &path, HWND window)
{
CProcess process;
StartApplication(dir, path, window, process);

View File

@@ -306,7 +306,7 @@ void CPanel::Properties()
}
}
}
::MessageBoxW(*(this), message, LangString(IDS_PROPERTIES), MB_OK);
::MessageBoxW(*(this), message, LangString(IDS_PROPERTIES), MB_OK | MB_ICONINFORMATION);
}
}

View File

@@ -422,6 +422,9 @@ void CApp::Combine()
AddInfoFileName(info, fs2us(combiner.Names.Back()));
}
bool openOutputFolder;
bool deleteSourceFile;
bool close7Zip;
{
CCopyDialog copyDialog;
copyDialog.Value = path;
@@ -430,9 +433,13 @@ void CApp::Combine()
copyDialog.Title += srcPanel.GetItemRelPath(index);
LangString(IDS_COMBINE_TO, copyDialog.Static);
copyDialog.Info = info;
copyDialog.m_currentFolderPrefix = srcPanel.GetItemFullPath(index);
if (copyDialog.Create(srcPanel.GetParent()) != IDOK)
return;
path = copyDialog.Value;
openOutputFolder = copyDialog.m_bOpenOutputFolder;
deleteSourceFile = copyDialog.m_bDeleteSourceFile;
close7Zip = copyDialog.m_bClose7Zip;
}
NName::NormalizeDirPathPrefix(path);
@@ -479,6 +486,37 @@ void CApp::Combine()
if (combiner.Create(title, _window) != 0)
return;
if (openOutputFolder)
{
StartApplicationDontWait(path, path, (HWND)_window);
}
if (deleteSourceFile)
{
DWORD dwAttr;
UString strFilePath;
for (i = 0; i < combiner.Names.Size(); i++)
{
strFilePath = srcPath + combiner.Names[i];
dwAttr = GetFileAttributesW(strFilePath);
if ((dwAttr != INVALID_FILE_ATTRIBUTES)
&& (dwAttr & FILE_ATTRIBUTE_ARCHIVE))
{
if (dwAttr & FILE_ATTRIBUTE_READONLY)
{
dwAttr &= (~FILE_ATTRIBUTE_READONLY);
SetFileAttributesW(strFilePath, dwAttr);
}
::DeleteFileW(strFilePath);
}
}
}
if (close7Zip)
{
PostMessage (_window, WM_CLOSE, 0, 0);
}
}
RefreshTitleAlways();

View File

@@ -9,16 +9,19 @@
#include "../../../Windows/ErrorMsg.h"
#include "../GUI/ExtractRes.h"
#include "resourceGui.h"
#include "LangUtils.h"
#include "DialogSize.h"
#include "ProgressDialog2.h"
#include "ProgressDialog2Res.h"
#include "ProgressDialog2IconRes.h"
using namespace NWindows;
extern HINSTANCE g_hInstance;
bool g_bProcessError = false;
static const UINT_PTR kTimerID = 3;
@@ -66,6 +69,38 @@ static const UInt32 kLangIDs_Colon[] =
#endif
//////////////////
#define WM_TRAY_ICON_NOTIFY (WM_APP+10)
#define ID_SYSTRAY_ICON 100
BOOL SetSysTray(HWND hDlg,
DWORD dwMessage,
UINT uID,
UINT uFlags,
UINT uCallbackMessage,
HICON hIcon,
const wchar_t * pszTip)
{
NOTIFYICONDATAW tnd;
ZeroMemory(&tnd, sizeof(NOTIFYICONDATAW));
tnd.cbSize = sizeof(NOTIFYICONDATAW);
tnd.hWnd = hDlg;
tnd.uID = uID;
tnd.uFlags = uFlags;
tnd.uCallbackMessage = uCallbackMessage;
tnd.hIcon = hIcon;
if (pszTip != NULL && *pszTip != 0)
{
::lstrcpynW(tnd.szTip, pszTip, sizeof(tnd.szTip) / sizeof(WCHAR));
}
return Shell_NotifyIconW(dwMessage, &tnd);
}
#define UNDEFINED_VAL ((UInt64)(Int64)-1)
#define INIT_AS_UNDEFINED(v) v = UNDEFINED_VAL;
@@ -238,6 +273,13 @@ void CProgressSync::AddError_Code_Name(DWORD systemError, const wchar_t *name)
CProgressDialog::CProgressDialog(): _timer(0), CompressingMode(true), MainWindow(0)
{
for (int i = 0; i < 15; i++)
{
m_hIconSysTrayArray[i] = NULL;
}
m_nSysTrayIconArrayID = -1;
m_hSysTrayMenu = NULL;
_isDir = false;
_numMessages = 0;
@@ -372,6 +414,7 @@ bool CProgressDialog::OnInit()
LangString(IDS_PROGRESS_FOREGROUND, _foreground_String);
LangString(IDS_CONTINUE, _continue_String);
LangString(IDS_PROGRESS_PAUSED, _paused_String);
LangString(IDS_CANCEL, cancelString);
SetText(_title);
SetPauseText();
@@ -412,6 +455,11 @@ bool CProgressDialog::OnInit()
SetTaskbarProgressState();
RECT rc;
GetWindowRect(&rc);
m_sizeMinWindow.cx = (RECT_SIZE_X(rc))*2/3;
m_sizeMinWindow.cy = (RECT_SIZE_Y(rc))*3/4;
return CModalDialog::OnInit();
}
@@ -444,7 +492,7 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
sStep = r.top - my;
}
InvalidateRect(NULL);
// InvalidateRect(NULL);
int xSizeClient = xSize - mx * 2;
@@ -458,9 +506,19 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
int yPos = ySize - my - _buttonSizeY;
ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_STATUS), xSize - mx * 2);
ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_FILE_NAME), xSize - mx * 2);
ChangeSubWindowSizeX(GetItem(IDC_PROGRESS1), xSize - mx * 2);
ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_STATUS), xSize - mx * 2, false);
// ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_FILE_NAME), xSize - mx * 2);
{
int percent_width;
RECT rect;
GetClientRectOfItem(IDC_PROGRESS_PERCENT, rect);
percent_width = rect.right - rect.left;
MoveItem(IDC_PROGRESS_PERCENT, xSize - mx - percent_width, rect.top, percent_width, rect.bottom - rect.top, false);
ChangeSubWindowSizeX(GetItem(IDT_PROGRESS_FILE_NAME), xSize - (mx * 2) - percent_width, false);
}
ChangeSubWindowSizeX(GetItem(IDC_PROGRESS1), xSize - mx * 2, false);
int bSizeX = _buttonSizeX;
int mx2 = mx;
@@ -492,17 +550,17 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
xx -= bSizeX;
}
_messageList.Move(mx, y, xx, ySize2);
_messageList.Move(mx, y, xx, ySize2, false);
}
{
int xPos = xSize - mx;
xPos -= bSizeX;
MoveItem(IDCANCEL, xPos, yPos, bSizeX, _buttonSizeY);
MoveItem(IDCANCEL, xPos, yPos, bSizeX, _buttonSizeY, false);
xPos -= (mx2 + bSizeX);
MoveItem(IDB_PAUSE, xPos, yPos, bSizeX, _buttonSizeY);
MoveItem(IDB_PAUSE, xPos, yPos, bSizeX, _buttonSizeY, false);
xPos -= (mx2 + bSizeX);
MoveItem(IDB_PROGRESS_BACKGROUND, xPos, yPos, bSizeX, _buttonSizeY);
MoveItem(IDB_PROGRESS_BACKGROUND, xPos, yPos, bSizeX, _buttonSizeY, false);
}
int valueSize;
@@ -543,10 +601,11 @@ bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
yPos = my;
x = mx + gSize + padSize;
}
MoveItem(kIDs[i], x, yPos, labelSize, sY);
MoveItem(kIDs[i + 1], x + labelSize, yPos, valueSize, sY);
MoveItem(kIDs[i], x, yPos, labelSize, sY, false);
MoveItem(kIDs[i + 1], x + labelSize, yPos, valueSize, sY, false);
yPos += sStep;
}
InvalidateRect(NULL);
return false;
}
@@ -672,6 +731,39 @@ static UInt64 MyMultAndDiv(UInt64 mult1, UInt64 mult2, UInt64 divider)
return res;
}
void CProgressDialog::UpdateSysTrayIcon(bool bAddIcon, bool bUpdateTip)
{
int nNewIconID = (_prevPercentValue / 7) % 15;
bool bUpdateIcon = nNewIconID > m_nSysTrayIconArrayID;
if (bUpdateIcon || bUpdateTip || bAddIcon)
{
wchar_t szTip[64];
ConvertUInt64ToString(_prevPercentValue, szTip);
lstrcatW(szTip, L"%");
/*
#ifdef _DEBUG
wchar_t szDebug[1024];
swprintf(szDebug, 1024, L"Percent: %d; Icon: %d\n", _prevPercentValue, nNewIconID);
OutputDebugStringW(szDebug);
#endif
*/
UINT uFlags = NIF_TIP;
if (bUpdateIcon)
{
uFlags |= NIF_ICON;
}
if (!SetSysTray(_window, NIM_MODIFY, ID_SYSTRAY_ICON, uFlags, 0, m_hIconSysTrayArray[nNewIconID], szTip))
{
SetSysTray(_window, NIM_DELETE, ID_SYSTRAY_ICON, 0, 0, NULL, NULL);
SetSysTray(_window, NIM_ADD, ID_SYSTRAY_ICON, NIF_ICON | NIF_MESSAGE | NIF_TIP, WM_TRAY_ICON_NOTIFY,
m_hIconSysTrayArray[nNewIconID], szTip);
}
m_nSysTrayIconArrayID = nNewIconID;
}
}
void CProgressDialog::UpdateStatInfo(bool showAll)
{
UInt64 total, completed, totalFiles, completedFiles, inSize, outSize;
@@ -725,6 +817,37 @@ void CProgressDialog::UpdateStatInfo(bool showAll)
ShowSize(IDT_PROGRESS_TOTAL_VAL, total, _totalBytes_Prev);
{
bool bPercentChanged = false;
UInt64 percent = 0;
{
if (IS_DEFINED_VAL(progressTotal))
{
percent = progressCompleted * 100;
if (progressTotal != 0)
percent /= progressTotal;
}
}
if (percent != _prevPercentValue)
{
_prevPercentValue = percent;
bPercentChanged = true;
}
if (bPercentChanged || titleFileName_Changed) SetTitleText();
if (bPercentChanged)
{
wchar_t szPercent[32];
ConvertUInt64ToString(percent, szPercent);
lstrcatW(szPercent, L"%");
SetItemText(IDC_PROGRESS_PERCENT, szPercent);
if (!_foreground && m_hIconSysTrayArray[0] != NULL)
{ // background
UpdateSysTrayIcon(false, true);
}
}
}
_elapsedTime += (curTime - _prevTime);
_prevTime = curTime;
UInt64 elapsedSec = _elapsedTime / 1000;
@@ -738,7 +861,7 @@ void CProgressDialog::UpdateStatInfo(bool showAll)
SetItemText(IDT_PROGRESS_ELAPSED_VAL, s);
}
bool needSetTitle = false;
// bool needSetTitle = false;
if (elapsedChanged || showAll)
{
if (numErrors > _numPostedMessages)
@@ -806,22 +929,22 @@ void CProgressDialog::UpdateStatInfo(bool showAll)
}
}
{
UInt64 percent = 0;
{
if (IS_DEFINED_VAL(progressTotal))
{
percent = progressCompleted * 100;
if (progressTotal != 0)
percent /= progressTotal;
}
}
if (percent != _prevPercentValue)
{
_prevPercentValue = percent;
needSetTitle = true;
}
}
//{
// UInt64 percent = 0;
// {
// if (IS_DEFINED_VAL(progressTotal))
// {
// percent = progressCompleted * 100;
// if (progressTotal != 0)
// percent /= progressTotal;
// }
// }
// if (percent != _prevPercentValue)
// {
// _prevPercentValue = percent;
// needSetTitle = true;
// }
//}
{
wchar_t s[64];
@@ -869,8 +992,8 @@ void CProgressDialog::UpdateStatInfo(bool showAll)
}
}
if (needSetTitle || titleFileName_Changed)
SetTitleText();
// if (needSetTitle || titleFileName_Changed)
// SetTitleText();
if (status_Changed)
{
@@ -996,7 +1119,7 @@ bool CProgressDialog::OnExternalCloseMessage()
{
if (fm.OkMessage.Title.IsEmpty())
fm.OkMessage.Title = L"7-Zip";
MessageBoxW(*this, fm.OkMessage.Message, fm.OkMessage.Title, MB_OK);
MessageBoxW(*this, fm.OkMessage.Message, fm.OkMessage.Title, MB_OK | MB_ICONINFORMATION);
}
}
@@ -1011,10 +1134,58 @@ bool CProgressDialog::OnExternalCloseMessage()
return true;
}
bool CProgressDialog::CreateSysTrayMenu()
{
if (m_hSysTrayMenu != NULL) return true;
m_hSysTrayMenu = CreatePopupMenu();
AppendMenuW(m_hSysTrayMenu, MF_STRING, IDB_PROGRESS_BACKGROUND, _foreground_String);
AppendMenuW(m_hSysTrayMenu, MF_STRING, IDB_PAUSE, Sync.Get_Paused() ? _continue_String : _pause_String);
AppendMenuW(m_hSysTrayMenu, MF_STRING, IDCANCEL, cancelString);
return m_hSysTrayMenu != NULL;
}
bool CProgressDialog::OnTrayNotification(LPARAM lParam)
{
switch (lParam)
{
case WM_RBUTTONUP:
if (CreateSysTrayMenu())
{
POINT point;
::GetCursorPos(&point);
::TrackPopupMenu(m_hSysTrayMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, 0, _window, NULL);
// BUGFIX: See "PRB: Menus for Notification Icons Don't Work Correctly"
::PostMessage(_window, WM_NULL, 0, 0);
}
break;
case WM_LBUTTONUP:
OnPriorityButton();
break;
default:
break;
}
return false;
}
bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_GETMINMAXINFO:
{
return OnGetMinMaxInfo((PMINMAXINFO)lParam);
}
case WM_TRAY_ICON_NOTIFY:
{
return OnTrayNotification(lParam);
}
case kCloseMessage:
{
KillTimer(_timer);
@@ -1024,6 +1195,30 @@ bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
_externalCloseMessageWasReceived = true;
break;
}
if (!_foreground)
{ // background
SetSysTray(_window, NIM_DELETE, ID_SYSTRAY_ICON, 0, 0, NULL, NULL);
//#ifndef _SFX
if (MainWindow != 0)
{
ShowWindow(MainWindow, SW_SHOW);
}
//#endif
}
if (m_hIconSysTrayArray[0] != NULL)
{
for (int i = 0; i < 15; i++)
{
DestroyIcon(m_hIconSysTrayArray[i]);
m_hIconSysTrayArray[i] = NULL;
}
}
if (m_hSysTrayMenu != NULL)
{
::DestroyMenu(m_hSysTrayMenu);
m_hSysTrayMenu = NULL;
}
return OnExternalCloseMessage();
}
/*
@@ -1038,6 +1233,13 @@ bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
return CModalDialog::OnMessage(message, wParam, lParam);
}
bool CProgressDialog::OnGetMinMaxInfo(PMINMAXINFO pMMI)
{
pMMI->ptMinTrackSize.x = m_sizeMinWindow.cx;
pMMI->ptMinTrackSize.y = m_sizeMinWindow.cy;
return false;
}
void CProgressDialog::SetTitleText()
{
UString s;
@@ -1082,8 +1284,15 @@ void CProgressDialog::SetTitleText()
void CProgressDialog::SetPauseText()
{
SetItemText(IDB_PAUSE, Sync.Get_Paused() ? _continue_String : _pause_String);
LPCWSTR pszText = (Sync.Get_Paused() ? _continue_String : _pause_String);
SetItemText(IDB_PAUSE, pszText);
SetTitleText();
if (m_hSysTrayMenu != NULL)
{
ModifyMenuW(m_hSysTrayMenu, IDB_PAUSE, MF_BYCOMMAND, IDB_PAUSE, pszText);
}
}
void CProgressDialog::OnPauseButton()
@@ -1106,11 +1315,53 @@ void CProgressDialog::SetPriorityText()
SetTitleText();
}
bool CProgressDialog::LoadSysTrayIcons()
{
if (m_hIconSysTrayArray[0] != NULL) return true;
int id = IDI_SYSTRAY_0;
for (int n=0; n<15; n++, id++)
{
m_hIconSysTrayArray[n] = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
}
return m_hIconSysTrayArray[0] != NULL;
}
void CProgressDialog::OnPriorityButton()
{
_foreground = !_foreground;
#ifndef UNDER_CE
SetPriorityClass(GetCurrentProcess(), _foreground ? NORMAL_PRIORITY_CLASS: IDLE_PRIORITY_CLASS);
if (_foreground)
{
if (m_hIconSysTrayArray[0] != NULL)
{
//#ifndef _SFX
if (MainWindow != 0)
{
ShowWindow(MainWindow, SW_SHOW);
}
//#endif
Show(SW_SHOW);
SetSysTray(_window, NIM_DELETE, ID_SYSTRAY_ICON, 0, 0, NULL, NULL);
}
}
else
{ // background
if (LoadSysTrayIcons())
{
//#ifndef _SFX
if (MainWindow != 0)
{
ShowWindow(MainWindow, SW_HIDE);
}
//#endif
Show(SW_HIDE);
UpdateSysTrayIcon(true, true);
}
}
#endif
SetPriorityText();
}
@@ -1167,6 +1418,8 @@ void CProgressDialog::UpdateMessagesDialog()
}
if (!messages.IsEmpty())
{
g_bProcessError = true;
FOR_VECTOR (i, messages)
AddMessage(messages[i]);
if (_numAutoSizeMessages < 256 || GetNumDigits(_numPostedMessages) > GetNumDigits(_numAutoSizeMessages))
@@ -1197,11 +1450,11 @@ bool CProgressDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
if (!paused)
OnPauseButton();
_inCancelMessageBox = true;
int res = ::MessageBoxW(*this, LangString(IDS_PROGRESS_ASK_CANCEL), _title, MB_YESNOCANCEL);
int res = ::MessageBoxW(*this, LangString(IDS_PROGRESS_ASK_CANCEL), _title, MB_YESNO | MB_ICONQUESTION);
_inCancelMessageBox = false;
if (!paused)
OnPauseButton();
if (res == IDCANCEL || res == IDNO)
if (res == IDNO)
{
if (_externalCloseMessageWasReceived)
OnExternalCloseMessage();

View File

@@ -114,6 +114,7 @@ class CProgressDialog: public NWindows::NControl::CModalDialog
UString _pause_String;
UString _continue_String;
UString _paused_String;
UString cancelString;
int _buttonSizeX;
int _buttonSizeY;
@@ -122,6 +123,10 @@ class CProgressDialog: public NWindows::NControl::CModalDialog
UString _title;
HICON m_hIconSysTrayArray [15];
int m_nSysTrayIconArrayID;
HMENU m_hSysTrayMenu;
class CU64ToI32Converter
{
unsigned _numShiftBits;
@@ -192,6 +197,11 @@ class CProgressDialog: public NWindows::NControl::CModalDialog
bool _inCancelMessageBox;
bool _externalCloseMessageWasReceived;
SIZE m_sizeMinWindow;
bool CreateSysTrayMenu();
bool LoadSysTrayIcons();
void UpdateSysTrayIcon(bool bAddIcon, bool bUpdateTip);
#ifdef __ITaskbarList3_INTERFACE_DEFINED__
void SetTaskbarProgressState(TBPFLAG tbpFlags)
@@ -222,6 +232,8 @@ class CProgressDialog: public NWindows::NControl::CModalDialog
void OnPriorityButton();
bool OnButtonClicked(int buttonID, HWND buttonHWND);
bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
bool OnGetMinMaxInfo(PMINMAXINFO pMMI);
bool OnTrayNotification(LPARAM lParam);
void SetTitleText();
void ShowSize(int id, UInt64 val, UInt64 &prev);

View File

@@ -1,6 +1,8 @@
#include "ProgressDialog2Res.h"
#include "../../GuiCommon.rc"
#include "ProgressDialog2Icon.rc"
#undef DIALOG_ID
#define DIALOG_ID IDD_PROGRESS
#define xc 360
@@ -37,4 +39,5 @@ STRINGTABLE DISCARDABLE
IDS_CONTINUE "&Continue"
IDS_PROGRESS_ASK_CANCEL "Are you sure you want to cancel?"
IDS_CLOSE "&Close"
IDS_CANCEL "&Cancel"
}

View File

@@ -0,0 +1,19 @@
#include "ProgressDialog2IconRes.h"
IDI_SYSTRAY_0 ICON "../../UI/FileManager/trayico/tray00.ico"
IDI_SYSTRAY_1 ICON "../../UI/FileManager/trayico/tray01.ico"
IDI_SYSTRAY_2 ICON "../../UI/FileManager/trayico/tray02.ico"
IDI_SYSTRAY_3 ICON "../../UI/FileManager/trayico/tray03.ico"
IDI_SYSTRAY_4 ICON "../../UI/FileManager/trayico/tray04.ico"
IDI_SYSTRAY_5 ICON "../../UI/FileManager/trayico/tray05.ico"
IDI_SYSTRAY_6 ICON "../../UI/FileManager/trayico/tray06.ico"
IDI_SYSTRAY_7 ICON "../../UI/FileManager/trayico/tray07.ico"
IDI_SYSTRAY_8 ICON "../../UI/FileManager/trayico/tray08.ico"
IDI_SYSTRAY_9 ICON "../../UI/FileManager/trayico/tray09.ico"
IDI_SYSTRAY_10 ICON "../../UI/FileManager/trayico/tray10.ico"
IDI_SYSTRAY_11 ICON "../../UI/FileManager/trayico/tray11.ico"
IDI_SYSTRAY_12 ICON "../../UI/FileManager/trayico/tray12.ico"
IDI_SYSTRAY_13 ICON "../../UI/FileManager/trayico/tray13.ico"
IDI_SYSTRAY_14 ICON "../../UI/FileManager/trayico/tray14.ico"
//IDI_SYSTRAY_15 ICON "../../UI/FileManager/trayico/tray15.ico"
//IDI_SYSTRAY_16 ICON "../../UI/FileManager/trayico/tray16.ico"

View File

@@ -0,0 +1,17 @@
#define IDI_SYSTRAY_0 310
#define IDI_SYSTRAY_1 311
#define IDI_SYSTRAY_2 312
#define IDI_SYSTRAY_3 313
#define IDI_SYSTRAY_4 314
#define IDI_SYSTRAY_5 315
#define IDI_SYSTRAY_6 316
#define IDI_SYSTRAY_7 317
#define IDI_SYSTRAY_8 318
#define IDI_SYSTRAY_9 319
#define IDI_SYSTRAY_10 320
#define IDI_SYSTRAY_11 321
#define IDI_SYSTRAY_12 322
#define IDI_SYSTRAY_13 323
#define IDI_SYSTRAY_14 324
//#define IDI_SYSTRAY_15 325
//#define IDI_SYSTRAY_16 326

View File

@@ -3,6 +3,7 @@
#define IDS_CLOSE 408
#define IDS_CONTINUE 411
#define IDS_CANCEL 415
#define IDB_PROGRESS_BACKGROUND 444
#define IDS_PROGRESS_FOREGROUND 445
@@ -25,6 +26,7 @@
#define IDL_PROGRESS_MESSAGES 101
#define IDT_PROGRESS_FILE_NAME 102
#define IDT_PROGRESS_STATUS 103
#define IDC_PROGRESS_PERCENT 104
#define IDT_PROGRESS_PACKED_VAL 110
#define IDT_PROGRESS_FILES_VAL 111

View File

@@ -39,6 +39,7 @@
#define yc (z0 + z0s + bys)
#define percent_width 23
DIALOG_ID DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT
CAPTION "Progress"
@@ -70,7 +71,8 @@ CAPTION "Progress"
RTEXT "", IDT_PROGRESS_PACKED_VAL, x3, y3, x3s, MY_TEXT_NOPREFIX
LTEXT "", IDT_PROGRESS_STATUS, m, z3, xc, MY_TEXT_NOPREFIX
CONTROL "", IDT_PROGRESS_FILE_NAME, "Static", SS_NOPREFIX | SS_LEFTNOWORDWRAP, m, z2, xc, z2s
CONTROL "", IDT_PROGRESS_FILE_NAME, "Static", SS_NOPREFIX | SS_LEFTNOWORDWRAP, m, z2, xc - percent_width, z2s
RTEXT "", IDC_PROGRESS_PERCENT, m + xc - percent_width, z2, percent_width, z2s, SS_NOPREFIX | SS_CENTERIMAGE
CONTROL "Progress1", IDC_PROGRESS1, "msctls_progress32", PBS_SMOOTH | WS_BORDER, m, z1, xc, z1s

View File

@@ -49,31 +49,31 @@ bool CSplitDialog::OnInit()
return CModalDialog::OnInit();
}
bool CSplitDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
{
int mx, my;
GetMargins(8, mx, my);
int bx1, bx2, by;
GetItemSizes(IDCANCEL, bx1, by);
GetItemSizes(IDOK, bx2, by);
int yPos = ySize - my - by;
int xPos = xSize - mx - bx1;
InvalidateRect(NULL);
{
RECT r;
GetClientRectOfItem(IDB_SPLIT_PATH, r);
int bx = RECT_SIZE_X(r);
MoveItem(IDB_SPLIT_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r));
ChangeSubWindowSizeX(_pathCombo, xSize - mx - mx - bx - mx);
}
MoveItem(IDCANCEL, xPos, yPos, bx1, by);
MoveItem(IDOK, xPos - mx - bx2, yPos, bx2, by);
return false;
}
//bool CSplitDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
//{
// int mx, my;
// GetMargins(8, mx, my);
// int bx1, bx2, by;
// GetItemSizes(IDCANCEL, bx1, by);
// GetItemSizes(IDOK, bx2, by);
// int yPos = ySize - my - by;
// int xPos = xSize - mx - bx1;
//
// InvalidateRect(NULL);
//
// {
// RECT r;
// GetClientRectOfItem(IDB_SPLIT_PATH, r);
// int bx = RECT_SIZE_X(r);
// MoveItem(IDB_SPLIT_PATH, xSize - mx - bx, r.top, bx, RECT_SIZE_Y(r));
// ChangeSubWindowSizeX(_pathCombo, xSize - mx - mx - bx - mx);
// }
//
// MoveItem(IDCANCEL, xPos, yPos, bx1, by);
// MoveItem(IDOK, xPos - mx - bx2, yPos, bx2, by);
//
// return false;
//}
bool CSplitDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
{

View File

@@ -14,7 +14,7 @@ class CSplitDialog: public NWindows::NControl::CModalDialog
NWindows::NControl::CComboBox _volumeCombo;
virtual void OnOK();
virtual bool OnInit();
virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
// virtual bool OnSize(WPARAM wParam, int xSize, int ySize);
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
void OnButtonSetPath();
public:

View File

@@ -4,7 +4,7 @@
#define xc 288
#define yc 96
IDD_SPLIT DIALOG 0, 0, xs, ys MY_MODAL_RESIZE_DIALOG_STYLE MY_FONT
IDD_SPLIT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
CAPTION "Split File"
BEGIN
LTEXT "&Split to:", IDT_SPLIT_PATH, m, m, xc, 8

View File

@@ -6,9 +6,9 @@
/* we used 0x0400 for Windows NT supporting (MENUITEMINFOW)
But now menu problem is fixed. So it's OK to use 0x0500 (Windows 2000) */
// #define _WIN32_WINNT 0x0400
#define _WIN32_WINNT 0x0500
#define WINVER _WIN32_WINNT
//// #define _WIN32_WINNT 0x0400
//#define _WIN32_WINNT 0x0500
//#define WINVER _WIN32_WINNT
#include "../../../Common/Common.h"

View File

@@ -30,6 +30,9 @@ static const TCHAR *kFolderHistoryValueName = TEXT("FolderHistory");
static const TCHAR *kFastFoldersValueName = TEXT("FolderShortcuts");
static const TCHAR *kCopyHistoryValueName = TEXT("CopyHistory");
static const TCHAR *kOpenOutputFolderValueName = TEXT("OpenOutputFolder");
static const TCHAR *kClose7ZipValueName = TEXT("Close7Zip");
static NSynchronization::CCriticalSection g_CS;
#define Set32(p, v) SetUi32(((Byte *)p), v)
@@ -310,3 +313,39 @@ void AddUniqueStringToHeadOfList(UStringVector &list, const UString &s)
i++;
list.Insert(0, s);
}
void SaveOptOpenOutputFolder(bool bOpen)
{
CKey key;
key.Create(HKEY_CURRENT_USER, kCUBasePath);
key.SetValue(kOpenOutputFolderValueName, bOpen);
}
bool ReadOptOpenOutputFolder()
{
CKey key;
if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) != ERROR_SUCCESS)
return false;
bool bOpen;
if (key.QueryValue(kOpenOutputFolderValueName, bOpen) != ERROR_SUCCESS)
return false;
return bOpen;
}
void SaveOptClose7Zip(bool bClose7Zip)
{
CKey key;
key.Create(HKEY_CURRENT_USER, kCUBasePath);
key.SetValue(kClose7ZipValueName, bClose7Zip);
}
bool ReadOptClose7Zip()
{
CKey key;
if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) != ERROR_SUCCESS)
return false;
bool bOpen;
if (key.QueryValue(kClose7ZipValueName, bOpen) != ERROR_SUCCESS)
return false;
return bOpen;
}

View File

@@ -112,4 +112,10 @@ void ReadCopyHistory(UStringVector &folders);
void AddUniqueStringToHeadOfList(UStringVector &list, const UString &s);
void SaveOptOpenOutputFolder(bool bOpen);
bool ReadOptOpenOutputFolder();
void SaveOptClose7Zip(bool bClose7Zip);
bool ReadOptClose7Zip();
#endif

View File

@@ -93,6 +93,7 @@
#define IDM_HELP_CONTENTS 960
#define IDM_ABOUT 961
#define IDM_ABOUT_EASY_7ZIP 962
#define IDS_OPTIONS 2100

View File

@@ -124,15 +124,16 @@ BEGIN
#endif
MENUITEM SEPARATOR
MENUITEM "&About 7-Zip...", IDM_ABOUT
MENUITEM "&About Easy 7-Zip...", IDM_ABOUT_EASY_7ZIP
END
END
IDI_ICON ICON "../../UI/FileManager/FM.ico"
#ifndef UNDER_CE
1 24 MOVEABLE PURE "../../UI/FileManager/7zFM.exe.manifest"
#endif
//#ifndef UNDER_CE
//1 24 MOVEABLE PURE "../../UI/FileManager/7zFM.exe.manifest"
//#endif
IDB_ADD BITMAP "../../UI/FileManager/Add.bmp"
IDB_EXTRACT BITMAP "../../UI/FileManager/Extract.bmp"
@@ -237,6 +238,7 @@ BEGIN
END
#include "AboutDialog.rc"
#include "AboutEasy7ZipDialog.rc"
#include "BrowseDialog.rc"
#include "ComboDialog.rc"
#include "CopyDialog.rc"

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View File

@@ -38,7 +38,7 @@
#define g4xs (xc - gSize - gSpace)
#define g4xs2 (g4xs - m - m)
#define yOpt 80
#define yOpt (80+1)
#define xArcFolderOffs 40
@@ -52,15 +52,15 @@
#define GROUP_Y_SIZE_ENCRYPT 128
#endif
#define yPsw (yOpt + GROUP_Y_SIZE + 8)
#define yPsw (yOpt + GROUP_Y_SIZE + 8 + 2)
IDD_COMPRESS DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
CAPTION "Add to Archive"
BEGIN
LTEXT "", IDT_COMPRESS_ARCHIVE_FOLDER, m + xArcFolderOffs, m, xc - xArcFolderOffs, 8
LTEXT "&Archive:", IDT_COMPRESS_ARCHIVE, m, 12, xArcFolderOffs, 8
COMBOBOX IDC_COMPRESS_ARCHIVE, m + xArcFolderOffs, 18, xc - bxsDots - 12 - xArcFolderOffs, 126, MY_COMBO_WITH_EDIT
PUSHBUTTON "...", IDB_COMPRESS_SET_ARCHIVE, xs - m - bxsDots, 16, bxsDots, bys, WS_GROUP
COMBOBOX IDC_COMPRESS_ARCHIVE, m + xArcFolderOffs, 18, xc - bxsDots - 4 - xArcFolderOffs, 160, MY_COMBO_WITH_EDIT
PUSHBUTTON "...", IDB_COMPRESS_SET_ARCHIVE, xs - m - bxsDots, 16+1, bxsDots, bys-1, WS_GROUP
LTEXT "Archive &format:", IDT_COMPRESS_FORMAT, m, 41, g0xs, 8
COMBOBOX IDC_COMPRESS_FORMAT, g1x, 39, g1xs, 80, MY_COMBO | CBS_SORT

View File

@@ -18,6 +18,8 @@
#include "../FileManager/LangUtils.h"
#include "../FileManager/resourceGui.h"
#include "../FileManager/ViewSettings.h"
#include "ExtractDialog.h"
#include "ExtractDialogRes.h"
#include "ExtractRes.h"
@@ -88,7 +90,7 @@ static const UInt32 kLangIDs[] =
// static const int kWildcardsButtonIndex = 2;
#ifndef NO_REGISTRY
static const unsigned kHistorySize = 16;
static const unsigned kHistorySize = 30;
#endif
#ifndef _SFX
@@ -133,6 +135,21 @@ void CExtractDialog::GetButton_Bools(UINT id, CBoolPair &b1, CBoolPair &b2)
#endif
void StartApplication(const UString &dir, const UString &path)
{
SHELLEXECUTEINFOW execInfo;
ZeroMemory(&execInfo, sizeof(execInfo));
execInfo.cbSize = sizeof(execInfo);
execInfo.fMask = SEE_MASK_FLAG_DDEWAIT;
execInfo.hwnd = NULL;
execInfo.lpVerb = NULL;
execInfo.lpFile = path;
execInfo.lpParameters = NULL;
execInfo.lpDirectory = dir.IsEmpty() ? NULL : (LPCWSTR)dir;
execInfo.nShow = SW_SHOWNORMAL;
ShellExecuteExW(&execInfo);
}
bool CExtractDialog::OnInit()
{
#ifdef LANG
@@ -159,6 +176,9 @@ bool CExtractDialog::OnInit()
_pathName.Attach(GetItem(IDE_EXTRACT_NAME));
#endif
_freeSpace.Attach(GetItem(IDC_STATIC_EXTRACT_FREE_SPACE));
_freeSpace.SetText(L"");
#ifdef NO_REGISTRY
PathMode = NExtract::NPathMode::kFullPaths;
@@ -207,6 +227,7 @@ bool CExtractDialog::OnInit()
#endif
_path.SetText(pathPrefix);
ShowPathFreeSpace(pathPrefix);
#ifndef NO_REGISTRY
for (unsigned i = 0; i < _info.Paths.Size() && i < kHistorySize; i++)
@@ -220,6 +241,11 @@ bool CExtractDialog::OnInit()
_path.SetCurSel(-1);
*/
#ifndef _SFX
m_bOpenOutputFolder = ReadOptOpenOutputFolder();
CheckButton(IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER, m_bOpenOutputFolder);
#endif
#ifndef _SFX
_pathMode.Attach(GetItem(IDC_EXTRACT_PATH_MODE));
@@ -258,6 +284,21 @@ bool CExtractDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
case IDB_EXTRACT_SET_PATH:
OnButtonSetPath();
return true;
case IDC_EXTRACT_BUTTON_OPEN_PATH:
OnButtonOpenPath();
return true;
case IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER:
m_bOpenOutputFolder = IsButtonCheckedBool(IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER);
return true;
#ifndef _SFX
case IDC_CHECK_DELETE_SOURCE_FILE:
m_bDeleteSourceFile = IsButtonCheckedBool(IDC_CHECK_DELETE_SOURCE_FILE);
return true;
#endif
#ifndef _SFX
case IDX_EXTRACT_NAME_ENABLE:
ShowItem_Bool(IDE_EXTRACT_NAME, IsButtonCheckedBool(IDX_EXTRACT_NAME_ENABLE));
@@ -284,6 +325,7 @@ void CExtractDialog::OnButtonSetPath()
_path.SetCurSel(-1);
#endif
_path.SetText(resultPath);
ShowPathFreeSpace(resultPath);
}
void AddUniqueString(UStringVector &list, const UString &s)
@@ -296,6 +338,10 @@ void AddUniqueString(UStringVector &list, const UString &s)
void CExtractDialog::OnOK()
{
#ifndef _SFX
SaveOptOpenOutputFolder(m_bOpenOutputFolder);
#endif
#ifndef _SFX
int pathMode2 = kPathModeButtonsVals[_pathMode.GetCurSel()];
if (PathMode != NExtract::NPathMode::kCurPaths ||
@@ -416,3 +462,147 @@ void CExtractDialog::OnHelp()
CModalDialog::OnHelp();
}
#endif
BOOL IsDirectory(const wchar_t * lpszPathFile)
{
DWORD dwAttr;
dwAttr = GetFileAttributesW(lpszPathFile);
return (dwAttr != (DWORD)-1) && (dwAttr & FILE_ATTRIBUTE_DIRECTORY);
}
void CExtractDialog::OnButtonOpenPath()
{
UString currentPath;
_path.GetText(currentPath);
if (IsDirectory(currentPath))
{
StartApplication(currentPath, currentPath);
}
else
{
wchar_t szMsg[1024];
wsprintfW(szMsg, L"Folder \"%s\" is not available yet.\n\n"
L"Note: the program will create the folder automatically when extracting.", (LPCWSTR)currentPath);
MessageBoxW((HWND)_window, szMsg, L"7-Zip", MB_ICONEXCLAMATION);
}
}
static int MakeByteSizeString64(wchar_t * lpszBuf, size_t ccBuf, unsigned __int64 n64Byte)
{
int nRet = 0;
if (n64Byte < 1000ui64)
{
// < 1K
nRet = swprintf(lpszBuf, ccBuf,
L"%I64d B", n64Byte);
}
else if (n64Byte < 1024000ui64) // 1024 * 1000
{
// 1K <= n64Byte < 1M
nRet = swprintf(lpszBuf, ccBuf,
L"%.1f KB", (double)n64Byte / 1024.0);
}
else if (n64Byte < 1048576000ui64) // 1024 * 1024 * 1000
{
// 1M <= n64Byte < 1G
nRet = swprintf(lpszBuf, ccBuf,
L"%.2f MB", (double)n64Byte / 1048576.0); // 1024 * 1024
}
else if (n64Byte < 1073741824000ui64) // 1024 * 1024 * 1024 * 1000
{
// 1 G <= n64Byte < 1T
nRet = swprintf(lpszBuf, ccBuf,
L"%.2f GB", (double)n64Byte / 1073741824.0); // 1024.0F * 1024.0F * 1024.0F
}
else
{
// n64Byte >= 1T
nRet = swprintf(lpszBuf, ccBuf,
L"%.2f TB", (double)n64Byte / 1099511627776.0);
// 1024.0F * 1024.0F * 1024.0F * 1024.0F
}
return nRet;
}
void CExtractDialog::ShowPathFreeSpace(UString & strPath)
{
bool bBadPath;
UString strText;
strText.Empty();
bBadPath = false;
strPath.Trim();
for (; !IsDirectory(strPath); )
{
int n = strPath.ReverseFind(L'\\');
if (n == -1)
{
bBadPath = true;
break;
}
else
{
strPath.ReleaseBuf_SetEnd(n);
}
}
if (!bBadPath)
{
unsigned __int64 n64FreeBytesAvailable;
unsigned __int64 n64TotalNumberOfBytes;
unsigned __int64 n64TotalNumberOfFreeBytes;
if (GetDiskFreeSpaceExW(strPath, (PULARGE_INTEGER)&n64FreeBytesAvailable,
(PULARGE_INTEGER)&n64TotalNumberOfBytes, (PULARGE_INTEGER)&n64TotalNumberOfFreeBytes))
{
wchar_t szFreeBytes[1024];
wchar_t szTotalBytes[1024];
MakeByteSizeString64(szFreeBytes, 1024-4, n64TotalNumberOfFreeBytes);
MakeByteSizeString64(szTotalBytes, 1024-4, n64TotalNumberOfBytes);
int nLen = swprintf(strText.GetBuf(1024), 1024-4, L"%s Free (Total: %s)", szFreeBytes, szTotalBytes);
strText.ReleaseBuf_SetEnd(nLen);
}
}
_freeSpace.SetText(strText);
}
bool CExtractDialog::OnCommand(int code, int itemID, LPARAM lParam)
{
if (itemID == IDC_EXTRACT_PATH)
{
#ifdef NO_REGISTRY
if (code == EN_CHANGE)
#else
if (code == CBN_EDITCHANGE)
#endif
{
UString strPath;
_path.GetText(strPath);
ShowPathFreeSpace(strPath);
return true;
}
#ifndef NO_REGISTRY
else if (code == CBN_SELCHANGE)
{
int nSel = _path.GetCurSel();
if (nSel != CB_ERR)
{
UString strPath;
_path.GetLBText(nSel, strPath);
ShowPathFreeSpace(strPath);
}
return true;
}
#endif
}
return CModalDialog::OnCommand(code, itemID, lParam);
}

View File

@@ -7,6 +7,7 @@
#include "../../../Windows/Control/ComboBox.h"
#include "../../../Windows/Control/Edit.h"
#include "../../../Windows/Control/Static.h"
#include "../Common/ExtractMode.h"
@@ -31,6 +32,8 @@ namespace NExtractionDialog
*/
}
void StartApplication(const UString &dir, const UString &path);
class CExtractDialog: public NWindows::NControl::CModalDialog
{
#ifdef NO_REGISTRY
@@ -45,6 +48,7 @@ class CExtractDialog: public NWindows::NControl::CModalDialog
NWindows::NControl::CComboBox _pathMode;
NWindows::NControl::CComboBox _overwriteMode;
#endif
NWindows::NControl::CStatic _freeSpace;
#ifndef _SFX
// int GetFilesMode() const;
@@ -58,6 +62,8 @@ class CExtractDialog: public NWindows::NControl::CModalDialog
virtual bool OnInit();
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
virtual void OnOK();
void OnButtonOpenPath();
virtual bool OnCommand(int code, int itemID, LPARAM lParam);
#ifndef NO_REGISTRY
@@ -67,6 +73,7 @@ class CExtractDialog: public NWindows::NControl::CModalDialog
#endif
void ShowPathFreeSpace(UString & strPath);
bool IsShowPasswordChecked() const { return IsButtonCheckedBool(IDX_PASSWORD_SHOW); }
public:
// bool _enableSelectedFilesButton;
@@ -84,6 +91,9 @@ public:
NExtract::NPathMode::EEnum PathMode;
NExtract::NOverwriteMode::EEnum OverwriteMode;
bool m_bOpenOutputFolder;
bool m_bDeleteSourceFile;
#ifndef _SFX
// CBoolPair AltStreams;
CBoolPair NtSecurity;
@@ -103,7 +113,8 @@ public:
CExtractDialog():
PathMode_Force(false),
OverwriteMode_Force(false)
OverwriteMode_Force(false),
m_bOpenOutputFolder(false), m_bDeleteSourceFile(false)
{
ElimDup.Val = true;
}

View File

@@ -2,7 +2,7 @@
#include "../../GuiCommon.rc"
#define xc 336
#define yc 168
#define yc 200
#undef g1xs
#undef g2x
@@ -18,6 +18,13 @@
#define g2xs (xc - g1xs - gSpace)
#define g2xs2 (g2xs - m - m)
#define bxsOpen 30
#define xsSpace 4
#define e7zYbase 58
#define newControlHeight 42
#define newControlHeight2 58
#undef GROUP_Y_SIZE
#ifdef UNDER_CE
#define GROUP_Y_SIZE 8
@@ -29,30 +36,36 @@ IDD_EXTRACT DIALOG 0, 0, xs, ys MY_MODAL_DIALOG_STYLE MY_FONT
CAPTION "Extract"
BEGIN
LTEXT "E&xtract to:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8
COMBOBOX IDC_EXTRACT_PATH, m, m + 12, xc - bxsDots - 12, 100, MY_COMBO_WITH_EDIT
PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots, m + 12 - 2, bxsDots, bys, WS_GROUP
COMBOBOX IDC_EXTRACT_PATH, m, m + 12, xc - bxsDots - xsSpace - bxsOpen - xsSpace, 160, MY_COMBO_WITH_EDIT
PUSHBUTTON "...", IDB_EXTRACT_SET_PATH, xs - m - bxsDots - xsSpace - bxsOpen, m + 12 - 1, bxsDots, bys-1, WS_GROUP
PUSHBUTTON "&Open", IDC_EXTRACT_BUTTON_OPEN_PATH, xs - m - bxsOpen, m + 12 - 1, bxsOpen, bys-1, WS_GROUP
CONTROL "", IDX_EXTRACT_NAME_ENABLE, MY_CHECKBOX, m, m + 34, 12, 10
EDITTEXT IDE_EXTRACT_NAME, m + 12 + 2, m + 32, g1xs - 12 - 2, 14, ES_AUTOHSCROLL
EDITTEXT IDE_EXTRACT_NAME, m + 12 + 2, m + 32, xc - 12 - 2, 14, ES_AUTOHSCROLL
LTEXT "Path mode:", IDT_EXTRACT_PATH_MODE, m, m + 52, g1xs, 8
COMBOBOX IDC_EXTRACT_PATH_MODE, m, m + 64, g1xs, 140, MY_COMBO
LTEXT "", IDC_STATIC_EXTRACT_FREE_SPACE, m, e7zYbase, xc, 8
GROUPBOX "After extraction completes successfully", IDC_GUI_AFTER_EXTRACT, m, e7zYbase+12, xc, 27
CONTROL "O&pen output folder", IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER, MY_CHECKBOX, 14, e7zYbase+24, 100, 10
CONTROL "&Delete source archives", IDC_CHECK_DELETE_SOURCE_FILE, MY_CHECKBOX, 125, e7zYbase+24, 120, 10
LTEXT "Path mode:", IDT_EXTRACT_PATH_MODE, m, m + 52 + newControlHeight, g1xs, 8
COMBOBOX IDC_EXTRACT_PATH_MODE, m, m + 64 + newControlHeight, g1xs, 140, MY_COMBO
CONTROL "Eliminate duplication of root folder", IDX_EXTRACT_ELIM_DUP, MY_CHECKBOX,
m, m + 84, g1xs, 10
m, m + 84 + newControlHeight, g1xs, 10
LTEXT "Overwrite mode:", IDT_EXTRACT_OVERWRITE_MODE, m, m + 104, g1xs, 8
COMBOBOX IDC_EXTRACT_OVERWRITE_MODE, m, m + 116, g1xs, 140, MY_COMBO
LTEXT "Overwrite mode:", IDT_EXTRACT_OVERWRITE_MODE, m, m + 104 + newControlHeight, g1xs, 8
COMBOBOX IDC_EXTRACT_OVERWRITE_MODE, m, m + 116 + newControlHeight, g1xs, 140, MY_COMBO
GROUPBOX "Password", IDG_PASSWORD, g2x, m + 36, g2xs, GROUP_Y_SIZE
EDITTEXT IDE_EXTRACT_PASSWORD, g2x2, m + 50, g2xs2, 14, ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "Show Password", IDX_PASSWORD_SHOW, MY_CHECKBOX, g2x2, m + 72, g2xs2, 10
GROUPBOX "Password", IDG_PASSWORD, g2x, m + 36 + newControlHeight2, g2xs, GROUP_Y_SIZE
EDITTEXT IDE_EXTRACT_PASSWORD, g2x2, m + 50 + newControlHeight2, g2xs2, 14, ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "Show Password", IDX_PASSWORD_SHOW, MY_CHECKBOX, g2x2, m + 72 + newControlHeight2, g2xs2, 10
// CONTROL "Restore alternate data streams", IDX_EXTRACT_ALT_STREAMS, MY_CHECKBOX,
// g2x, m + 104, g2xs, 10
CONTROL "Restore file security", IDX_EXTRACT_NT_SECUR, MY_CHECKBOX,
g2x, m + 104, g2xs, 10
g2x, m + 100 + newControlHeight2, g2xs, 10
DEFPUSHBUTTON "OK", IDOK, bx3, by, bxs, bys, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, bx2, by, bxs, bys

View File

@@ -6,6 +6,12 @@
#define IDC_EXTRACT_PATH_MODE 102
#define IDC_EXTRACT_OVERWRITE_MODE 103
#define IDC_EXTRACT_BUTTON_OPEN_PATH 105
#define IDC_EXTRACT_CHECK_OPEN_OUTPUT_FOLDER 106
#define IDC_STATIC_EXTRACT_FREE_SPACE 107
#define IDC_CHECK_DELETE_SOURCE_FILE 108
#define IDC_GUI_AFTER_EXTRACT 109
#define IDE_EXTRACT_PASSWORD 120
#define IDE_EXTRACT_NAME 130
@@ -22,3 +28,4 @@
#define IDX_PASSWORD_SHOW 3803
#define IDG_PASSWORD 3807

View File

@@ -34,6 +34,8 @@ using namespace NWindows;
using namespace NFile;
using namespace NDir;
extern bool g_bProcessError;
static const wchar_t *kIncorrectOutDir = L"Incorrect output directory path";
#ifndef _SFX
@@ -160,7 +162,11 @@ HRESULT ExtractGUI(
CExtractCallbackImp *extractCallback,
HWND hwndParent)
{
bool openOutputFolder = false;
bool deleteSourceFile = false;
messageWasDisplayed = false;
g_bProcessError = false;
CThreadExtracting extracter;
extracter.codecs = codecs;
@@ -213,6 +219,9 @@ HRESULT ExtractGUI(
options.PathMode = dialog.PathMode;
options.ElimDup = dialog.ElimDup;
openOutputFolder = dialog.m_bOpenOutputFolder;
deleteSourceFile = dialog.m_bDeleteSourceFile;
#ifndef _SFX
// options.NtOptions.AltStreams = dialog.AltStreams;
options.NtOptions.NtSecurity = dialog.NtSecurity;
@@ -268,5 +277,34 @@ HRESULT ExtractGUI(
RINOK(extracter.Create(title, hwndParent));
messageWasDisplayed = extracter.ThreadFinishedOK &
extracter.ProgressDialog.MessagesDisplayed;
if (extracter.ThreadFinishedOK && !g_bProcessError)
{
if (openOutputFolder)
{
StartApplication(options.OutputDir, options.OutputDir);
}
if (deleteSourceFile)
{
DWORD dwAttr;
UString strFilePath;
for (unsigned i = 0; i < archivePathsFull.Size(); i++)
{
strFilePath = archivePathsFull[i];
dwAttr = GetFileAttributesW(strFilePath);
if ((dwAttr != INVALID_FILE_ATTRIBUTES)
&& (dwAttr & FILE_ATTRIBUTE_ARCHIVE))
{
if (dwAttr & FILE_ATTRIBUTE_READONLY)
{
dwAttr &= (~FILE_ATTRIBUTE_READONLY);
SetFileAttributesW(strFilePath, dwAttr);
}
::DeleteFileW(strFilePath);
}
}
}
}
return extracter.Result;
}

38
CPP/7zip/UI/GUI/GUI.sln Normal file
View File

@@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI", "GUI.vcproj", "{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DebugU|Win32 = DebugU|Win32
DebugU|x64 = DebugU|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
ReleaseU|Win32 = ReleaseU|Win32
ReleaseU|x64 = ReleaseU|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.ActiveCfg = Debug|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|Win32.Build.0 = Debug|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.ActiveCfg = Debug|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Debug|x64.Build.0 = Debug|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.ActiveCfg = DebugU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|Win32.Build.0 = DebugU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.ActiveCfg = DebugU|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.DebugU|x64.Build.0 = DebugU|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.ActiveCfg = Release|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|Win32.Build.0 = Release|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.ActiveCfg = Release|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.Release|x64.Build.0 = Release|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.ActiveCfg = ReleaseU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|Win32.Build.0 = ReleaseU|Win32
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.ActiveCfg = ReleaseU|x64
{D4BC12CF-49F2-474D-BAF6-EAC069DB7D6C}.ReleaseU|x64.Build.0 = ReleaseU|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

8401
CPP/7zip/UI/GUI/GUI.vcproj Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -3,9 +3,9 @@
#ifndef __STDAFX_H
#define __STDAFX_H
// #define _WIN32_WINNT 0x0400
#define _WIN32_WINNT 0x0500
#define WINVER _WIN32_WINNT
//// #define _WIN32_WINNT 0x0400
//#define _WIN32_WINNT 0x0500
//#define WINVER _WIN32_WINNT
#include "../../../Common/Common.h"

View File

@@ -10,9 +10,9 @@ MY_VERSION_INFO(MY_VFT_APP, "7-Zip GUI", "7zg", "7zg.exe")
IDI_ICON ICON "FM.ico"
#ifndef UNDER_CE
1 24 MOVEABLE PURE "7zG.exe.manifest"
#endif
//#ifndef UNDER_CE
//1 24 MOVEABLE PURE "7zG.exe.manifest"
//#endif
#include "../FileManager/PropertyName.rc"
#include "../FileManager/OverwriteDialog.rc"

View File

@@ -3,11 +3,17 @@
#ifndef __COMMON_COMMON_H
#define __COMMON_COMMON_H
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
#define _WIN32_IE 0x0501
#include "../../C/Compiler.h"
#include "MyWindows.h"
#include "NewHandler.h"
#include <stdio.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[1]))
#endif

View File

@@ -364,7 +364,14 @@ public:
void Delete(unsigned index) throw();
void Delete(unsigned index, unsigned count) throw();
void DeleteFrontal(unsigned num) throw();
void DeleteBack() { _chars[--_len] = 0; }
// void DeleteBack() { _chars[--_len] = 0; }
void DeleteBack()
{
if (_len >= 1)
{
_chars[--_len] = 0;
}
}
void DeleteFrom(unsigned index)
{
if (index < _len)
@@ -537,6 +544,7 @@ public:
void SetFromAscii(const char *s);
void AddAscii(const char *s);
UString Mid(unsigned startIndex) const { return Mid(startIndex, _len - startIndex); }
UString Mid(unsigned startIndex, unsigned count) const { return UString(count, _chars + startIndex); }
UString Left(unsigned count) const { return UString(count, *this); }
@@ -600,7 +608,14 @@ public:
void Delete(unsigned index) throw();
void Delete(unsigned index, unsigned count) throw();
void DeleteFrontal(unsigned num) throw();
void DeleteBack() { _chars[--_len] = 0; }
// void DeleteBack() { _chars[--_len] = 0; }
void DeleteBack()
{
if (_len >= 1)
{
_chars[--_len] = 0;
}
}
void DeleteFrom(unsigned index)
{
if (index < _len)

View File

@@ -133,7 +133,7 @@ public:
bool Move(int x, int y, int width, int height, bool repaint = true)
{ return BOOLToBool(::MoveWindow(_window, x, y, width, height, BoolToBOOL(repaint))); }
bool ChangeSubWindowSizeX(HWND hwnd, int xSize)
bool ChangeSubWindowSizeX(HWND hwnd, int xSize, bool repaint = true)
{
RECT rect;
::GetWindowRect(hwnd, &rect);
@@ -141,7 +141,7 @@ public:
p1.x = rect.left;
p1.y = rect.top;
ScreenToClient(&p1);
return BOOLToBool(::MoveWindow(hwnd, p1.x, p1.y, xSize, rect.bottom - rect.top, TRUE));
return BOOLToBool(::MoveWindow(hwnd, p1.x, p1.y, xSize, rect.bottom - rect.top, BoolToBOOL(repaint)));
}
void ScreenToClient(RECT *rect)