Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2007-08-27 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:54 +0300
commit051769bbc577aeede90558b6ab5c9be187940ca0 (patch)
treee6330cb80f2d4a526d8aa27812528e053b0cda90 /CPP/7zip/UI/GUI
parent33ccab7e728a996800e166d849fe1e92a17e1afe (diff)
4.53 beta
Diffstat (limited to 'CPP/7zip/UI/GUI')
-rwxr-xr-xCPP/7zip/UI/GUI/BenchmarkDialog.cpp (renamed from CPP/7zip/UI/GUI/Resource/BenchmarkDialog/BenchmarkDialog.cpp)6
-rwxr-xr-xCPP/7zip/UI/GUI/BenchmarkDialog.h (renamed from CPP/7zip/UI/GUI/Resource/BenchmarkDialog/BenchmarkDialog.h)6
-rwxr-xr-xCPP/7zip/UI/GUI/BenchmarkDialog.rc (renamed from CPP/7zip/UI/GUI/Resource/BenchmarkDialog/resource.rc)4
-rwxr-xr-xCPP/7zip/UI/GUI/BenchmarkDialogRes.h (renamed from CPP/7zip/UI/GUI/Resource/BenchmarkDialog/resource.h)0
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialog.cpp16
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialog.h2
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialog.rc124
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialogRes.h52
-rwxr-xr-xCPP/7zip/UI/GUI/Extract.rc19
-rwxr-xr-xCPP/7zip/UI/GUI/ExtractDialog.cpp8
-rwxr-xr-xCPP/7zip/UI/GUI/ExtractDialog.h2
-rwxr-xr-xCPP/7zip/UI/GUI/ExtractDialog.rc80
-rwxr-xr-xCPP/7zip/UI/GUI/ExtractDialogRes.h28
-rwxr-xr-xCPP/7zip/UI/GUI/ExtractGUI.cpp54
-rwxr-xr-xCPP/7zip/UI/GUI/ExtractGUI.h2
-rwxr-xr-xCPP/7zip/UI/GUI/ExtractRes.h15
-rwxr-xr-xCPP/7zip/UI/GUI/GUI.cpp7
-rwxr-xr-xCPP/7zip/UI/GUI/GUI.dsp74
-rwxr-xr-xCPP/7zip/UI/GUI/OpenCallbackGUI.cpp2
-rwxr-xr-xCPP/7zip/UI/GUI/Resource/BenchmarkDialog/StdAfx.h16
-rwxr-xr-xCPP/7zip/UI/GUI/UpdateCallbackGUI.cpp20
-rwxr-xr-xCPP/7zip/UI/GUI/UpdateCallbackGUI.h22
-rwxr-xr-xCPP/7zip/UI/GUI/UpdateGUI.cpp8
-rwxr-xr-xCPP/7zip/UI/GUI/UpdateGUI.h2
-rwxr-xr-xCPP/7zip/UI/GUI/makefile24
-rwxr-xr-xCPP/7zip/UI/GUI/resource.h7
-rwxr-xr-xCPP/7zip/UI/GUI/resource.rc25
27 files changed, 486 insertions, 139 deletions
diff --git a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/BenchmarkDialog.cpp b/CPP/7zip/UI/GUI/BenchmarkDialog.cpp
index f9a78472..3177bb06 100755
--- a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/BenchmarkDialog.cpp
+++ b/CPP/7zip/UI/GUI/BenchmarkDialog.cpp
@@ -8,8 +8,8 @@
#include "Windows/Thread.h"
#include "Windows/Error.h"
#include "Windows/System.h"
-#include "../../../../FileManager/HelpUtils.h"
-#include "resource.h"
+#include "../FileManager/HelpUtils.h"
+// #include "BenchmarkDialogRes.h"
#include "BenchmarkDialog.h"
using namespace NWindows;
@@ -22,7 +22,7 @@ static const UINT_PTR kTimerID = 4;
static const UINT kTimerElapse = 1000;
#ifdef LANG
-#include "../../../../FileManager/LangUtils.h"
+#include "../FileManager/LangUtils.h"
#endif
using namespace NWindows;
diff --git a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/BenchmarkDialog.h b/CPP/7zip/UI/GUI/BenchmarkDialog.h
index 9474c5b8..2ba4a9a5 100755
--- a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/BenchmarkDialog.h
+++ b/CPP/7zip/UI/GUI/BenchmarkDialog.h
@@ -3,15 +3,15 @@
#ifndef __BENCHMARKDIALOG_H
#define __BENCHMARKDIALOG_H
-#include "resource.h"
+#include "BenchmarkDialogRes.h"
#include "Windows/Control/Dialog.h"
#include "Windows/Control/ComboBox.h"
#include "Windows/Synchronization.h"
-#include "../../../../Compress/LZMA_Alone/LzmaBench.h"
+#include "../../Compress/LZMA_Alone/LzmaBench.h"
#ifdef EXTERNAL_LZMA
-#include "../../../../UI/Common/LoadCodecs.h"
+#include "../Common/LoadCodecs.h"
#endif
struct CBenchInfo2 : public CBenchInfo
diff --git a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/resource.rc b/CPP/7zip/UI/GUI/BenchmarkDialog.rc
index 43b59be8..58f2ab62 100755
--- a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/resource.rc
+++ b/CPP/7zip/UI/GUI/BenchmarkDialog.rc
@@ -1,5 +1,5 @@
-#include "resource.h"
-#include "../../../../GuiCommon.rc"
+#include "BenchmarkDialogRes.h"
+#include "../../GuiCommon.rc"
#define xSize2 330
#define ySize2 228
diff --git a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/resource.h b/CPP/7zip/UI/GUI/BenchmarkDialogRes.h
index 6ef52188..6ef52188 100755
--- a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/resource.h
+++ b/CPP/7zip/UI/GUI/BenchmarkDialogRes.h
diff --git a/CPP/7zip/UI/GUI/CompressDialog.cpp b/CPP/7zip/UI/GUI/CompressDialog.cpp
index 99ac831d..6836f724 100755
--- a/CPP/7zip/UI/GUI/CompressDialog.cpp
+++ b/CPP/7zip/UI/GUI/CompressDialog.cpp
@@ -12,9 +12,9 @@
#include "Windows/ResourceString.h"
#include "Windows/System.h"
-#include "../../FileManager/HelpUtils.h"
-#include "../../FileManager/SplitUtils.h"
-#include "../../FileManager/FormatUtils.h"
+#include "../FileManager/HelpUtils.h"
+#include "../FileManager/SplitUtils.h"
+#include "../FileManager/FormatUtils.h"
#include "../Explorer/MyMessages.h"
@@ -27,10 +27,10 @@ extern bool g_IsNT;
#endif
#ifdef LANG
-#include "../../FileManager/LangUtils.h"
+#include "../FileManager/LangUtils.h"
#endif
-#include "../Resource/CompressDialog/resource.h"
+#include "CompressDialogRes.h"
#define MY_SIZE_OF_ARRAY(x) (sizeof(x) / sizeof(x[0]))
@@ -536,7 +536,7 @@ void CCompressDialog::OnOK()
UInt32 solidLogSize = GetBlockSizeSpec();
Info.SolidBlockSize = 0;
- if (solidLogSize > 0)
+ if (solidLogSize > 0 && solidLogSize != (UInt32)-1)
Info.SolidBlockSize = (solidLogSize >= 64) ? (UInt64)(Int64)-1 : ((UInt64)1 << solidLogSize);
Info.Method = GetMethodSpec();
@@ -1176,6 +1176,10 @@ void CCompressDialog::SetSolidBlockSize()
if (!fi.Solid)
return;
+ UInt32 level = GetLevel2();
+ if (level == 0)
+ return;
+
UInt32 dictionary = GetDictionarySpec();
if (dictionary == UInt32(-1))
dictionary = 1;
diff --git a/CPP/7zip/UI/GUI/CompressDialog.h b/CPP/7zip/UI/GUI/CompressDialog.h
index a23605d4..0b9e38c2 100755
--- a/CPP/7zip/UI/GUI/CompressDialog.h
+++ b/CPP/7zip/UI/GUI/CompressDialog.h
@@ -5,7 +5,7 @@
#include "../Common/ZipRegistry.h"
#include "../Common/LoadCodecs.h"
-#include "../Resource/CompressDialog/resource.h"
+#include "CompressDialogRes.h"
#include "Windows/Control/Dialog.h"
#include "Windows/Control/Edit.h"
diff --git a/CPP/7zip/UI/GUI/CompressDialog.rc b/CPP/7zip/UI/GUI/CompressDialog.rc
new file mode 100755
index 00000000..d2a14104
--- /dev/null
+++ b/CPP/7zip/UI/GUI/CompressDialog.rc
@@ -0,0 +1,124 @@
+#include "CompressDialogRes.h"
+#include "../../GuiCommon.rc"
+
+#define xSize2 400
+#define ySize2 305
+
+#define xSize (xSize2 + marg + marg)
+#define ySize (ySize2 + marg + marg)
+
+#undef gSize
+#undef gSpace
+#undef g0XSize
+#undef g1XPos
+#undef g1XSize
+#undef g2XSize
+#undef g3XPos
+#undef g3XSize
+#undef g4XPos
+#undef g4XPos2
+#undef g4XSize
+#undef g4XSize2
+#undef bXPos1
+#undef bXPos2
+#undef bXPos3
+#undef bYPos
+
+#define gSize 190
+#define gSpace 24
+
+#define g1XSize 90
+#define g0XSize (gSize - g1XSize)
+#define g1XPos (marg + g0XSize)
+
+#define g3XSize 40
+#define g2XSize (gSize - g3XSize)
+#define g3XPos (marg + g2XSize)
+
+#define g4XPos (marg + gSize + gSpace)
+#define g4XPos2 (g4XPos + 7)
+#define g4XSize (xSize2 - gSize - gSpace)
+#define g4XSize2 (g4XSize - 14)
+
+#define OptYPos 73
+#define PswYPos 128
+
+#define bXPos1 (xSize - marg - bXSize)
+#define bXPos2 (bXPos1 - 10 - bXSize)
+#define bXPos3 (bXPos2 - 10 - bXSize)
+
+#define bYPos (ySize - marg - bYSize)
+
+IDD_DIALOG_COMPRESS DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE
+CAPTION "Add to Archive"
+MY_FONT
+BEGIN
+ LTEXT "&Archive:", IDC_STATIC_COMPRESS_ARCHIVE, marg, marg, xSize2, 8
+ COMBOBOX IDC_COMPRESS_COMBO_ARCHIVE, marg, 18, xSize2 - bDotsSize - 12, 126, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "...", IDC_COMPRESS_BUTTON_SET_ARCHIVE, xSize - marg - bDotsSize, 17, bDotsSize, bYSize, WS_GROUP
+
+ LTEXT "Archive &format:", IDC_STATIC_COMPRESS_FORMAT, marg, 41, g0XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_FORMAT, g1XPos, 39, g1XSize , 80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ LTEXT "Compression &level:",IDC_STATIC_COMPRESS_LEVEL, marg, 62, g0XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_LEVEL, g1XPos, 60, g1XSize, 80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ LTEXT "Compression &method:",IDC_STATIC_COMPRESS_METHOD, marg, 83, g0XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_METHOD, g1XPos, 81, g1XSize, 80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ LTEXT "&Dictionary size:",IDC_STATIC_COMPRESS_DICTIONARY, marg, 104, g0XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_DICTIONARY, g1XPos, 102, g1XSize, 167, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ LTEXT "&Word size:",IDC_STATIC_COMPRESS_ORDER, marg, 125, g0XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_ORDER, g1XPos, 123, g1XSize, 141, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ LTEXT "&Solid Block size:",IDC_STATIC_COMPRESS_SOLID, marg, 146, g0XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_SOLID, g1XPos, 144, g1XSize, 140, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ LTEXT "&Number of CPU threads:",IDC_STATIC_COMPRESS_THREADS, marg, 167, g0XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_THREADS, g1XPos, 165, g1XSize - 35, 140, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "1", IDC_COMPRESS_HARDWARE_THREADS, g1XPos + g1XSize - 35 + 10, 167, 25, 8
+
+
+ LTEXT "Memory usage for Compressing:", IDC_STATIC_COMPRESS_MEMORY, marg, 190, g2XSize, 8
+ RTEXT "0", IDC_STATIC_COMPRESS_MEMORY_VALUE, g3XPos, 190, g3XSize, 8
+
+ LTEXT "Memory usage for Decompressing:", IDC_STATIC_COMPRESS_MEMORY_DE, marg, 206, g2XSize, 8
+ RTEXT "0",IDC_STATIC_COMPRESS_MEMORY_DE_VALUE, g3XPos, 206, g3XSize, 8
+
+
+ LTEXT "Split to &volumes, bytes:", IDC_STATIC_COMPRESS_VOLUME, marg, 225, gSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_VOLUME, marg, 237, gSize, 73, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+
+ LTEXT "&Parameters:",IDC_STATIC_COMPRESS_PARAMETERS, marg, 260, xSize2, 8
+ EDITTEXT IDC_COMPRESS_EDIT_PARAMETERS, marg, 272, xSize2, 14, ES_AUTOHSCROLL
+
+ LTEXT "&Update mode:",IDC_STATIC_COMPRESS_UPDATE_MODE, g4XPos, 39, g4XSize, 8
+ COMBOBOX IDC_COMPRESS_COMBO_UPDATE_MODE, g4XPos, 51, g4XSize, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ GROUPBOX "Options",IDC_STATIC_COMPRESS_OPTIONS, g4XPos, OptYPos, g4XSize, 48
+ CONTROL "Create SF&X archive",IDC_COMPRESS_SFX, "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+ g4XPos2, OptYPos + 14, g4XSize2, 10
+ CONTROL "Compress shared files",IDC_COMPRESS_SHARED, "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+ g4XPos2, OptYPos + 30, g4XSize2, 10
+
+ GROUPBOX "Encryption",IDC_COMPRESS_ENCRYPTION, g4XPos, PswYPos, g4XSize, 127
+
+ LTEXT "Enter password:",IDC_STATIC_COMPRESS_PASSWORD1, g4XPos2, PswYPos + 14, g4XSize2, 8
+ EDITTEXT IDC_COMPRESS_EDIT_PASSWORD1, g4XPos2, PswYPos + 26, g4XSize2, 14, ES_PASSWORD | ES_AUTOHSCROLL
+ LTEXT "Reenter password:",IDC_STATIC_COMPRESS_PASSWORD2, g4XPos2, PswYPos + 46, g4XSize2, 8
+ EDITTEXT IDC_COMPRESS_EDIT_PASSWORD2, g4XPos2, PswYPos + 58, g4XSize2, 14, ES_PASSWORD | ES_AUTOHSCROLL
+
+ CONTROL "Show Password",IDC_COMPRESS_CHECK_SHOW_PASSWORD,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+ g4XPos2, PswYPos + 79, g4XSize2, 10
+
+ LTEXT "&Encryption method:",IDC_STATIC_COMPRESS_ENCRYPTION_METHOD, g4XPos2, PswYPos + 95, 100, 8
+ COMBOBOX IDC_COMPRESS_COMBO_ENCRYPTION_METHOD, g4XPos2 + 100, PswYPos + 93, g4XSize2 - 100, 198, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+
+ CONTROL "Encrypt file &names", IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+ g4XPos2, PswYPos + 111, g4XSize2, 10
+
+ DEFPUSHBUTTON "OK", IDOK, bXPos3, bYPos, bXSize, bYSize, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, bXPos2, bYPos, bXSize, bYSize
+ PUSHBUTTON "Help", IDHELP, bXPos1, bYPos, bXSize, bYSize
+END
diff --git a/CPP/7zip/UI/GUI/CompressDialogRes.h b/CPP/7zip/UI/GUI/CompressDialogRes.h
new file mode 100755
index 00000000..beedde4e
--- /dev/null
+++ b/CPP/7zip/UI/GUI/CompressDialogRes.h
@@ -0,0 +1,52 @@
+#define IDD_DIALOG_COMPRESS 152
+#define IDC_STATIC_COMPRESS_MEMORY 1022
+#define IDC_STATIC_COMPRESS_MEMORY_DE 1023
+#define IDC_STATIC_COMPRESS_MEMORY_VALUE 1027
+#define IDC_STATIC_COMPRESS_MEMORY_DE_VALUE 1028
+#define IDC_COMPRESS_COMBO_ARCHIVE 1072
+#define IDC_COMPRESS_BUTTON_SET_ARCHIVE 1073
+#define IDC_COMPRESS_COMBO_LEVEL 1074
+#define IDC_COMPRESS_COMBO_UPDATE_MODE 1075
+#define IDC_COMPRESS_COMBO_FORMAT 1076
+#define IDC_COMPRESS_COMBO_VOLUME 1077
+#define IDC_COMPRESS_COMBO_METHOD 1078
+#define IDC_COMPRESS_COMBO_DICTIONARY 1079
+#define IDC_COMPRESS_COMBO_ORDER 1080
+
+#define IDC_COMPRESS_COMBO_SOLID 1081
+#define IDC_COMPRESS_COMBO_THREADS 1082
+#define IDC_COMPRESS_HARDWARE_THREADS 1083
+
+#define IDC_COMPRESS_SFX 1090
+#define IDC_COMPRESS_EDIT_PARAMETERS 1091
+
+// #define IDC_COMPRESS_SOLID 1092
+// #define IDC_COMPRESS_MULTI_THREAD 1093
+
+#define IDC_STATIC_COMPRESS_ARCHIVE 1097
+#define IDC_STATIC_COMPRESS_FORMAT 1098
+#define IDC_STATIC_COMPRESS_LEVEL 1099
+#define IDC_STATIC_COMPRESS_PARAMETERS 1100
+#define IDC_STATIC_COMPRESS_UPDATE_MODE 1101
+#define IDC_STATIC_COMPRESS_OPTIONS 1102
+#define IDC_STATIC_COMPRESS_VOLUME 1103
+#define IDC_STATIC_COMPRESS_METHOD 1104
+#define IDC_STATIC_COMPRESS_DICTIONARY 1105
+#define IDC_STATIC_COMPRESS_ORDER 1106
+
+#define IDC_STATIC_COMPRESS_SOLID 1107
+#define IDC_STATIC_COMPRESS_THREADS 1108
+
+#define IDC_COMPRESS_ENCRYPTION 1110
+#define IDC_STATIC_COMPRESS_PASSWORD1 1111
+#define IDC_COMPRESS_EDIT_PASSWORD1 1112
+#define IDC_STATIC_COMPRESS_PASSWORD2 1113
+#define IDC_COMPRESS_EDIT_PASSWORD2 1114
+#define IDC_COMPRESS_CHECK_SHOW_PASSWORD 1115
+
+#define IDC_STATIC_COMPRESS_ENCRYPTION_METHOD 1120
+#define IDC_COMPRESS_COMBO_ENCRYPTION_METHOD 1121
+
+#define IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES 1122
+
+#define IDC_COMPRESS_SHARED 1130
diff --git a/CPP/7zip/UI/GUI/Extract.rc b/CPP/7zip/UI/GUI/Extract.rc
new file mode 100755
index 00000000..4f2a520c
--- /dev/null
+++ b/CPP/7zip/UI/GUI/Extract.rc
@@ -0,0 +1,19 @@
+#include "ExtractRes.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'"
+ IDS_OPEN_IS_NOT_SUPORTED_ARCHIVE "File is not supported archive."
+ IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC "CRC failed in '{0}'. File is broken."
+ IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR "Data error in '{0}'. File is broken"
+ IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC_ENCRYPTED "CRC failed in encrypted file '{0}'. Wrong password?"
+ IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED "Data error in encrypted file '{0}'. Wrong password?"
+ IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_UNSUPPORTED_METHOD "Unsupported compression method for '{0}'."
+ IDS_EXTRACT_SET_FOLDER "Specify a location for extracted files."
+ IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CANNOT_OPEN_FILE "Can not open output file '{0}'."
+ IDS_PROGRESS_EXTRACTING "Extracting"
+ IDS_CANT_OPEN_ARCHIVE "Can not open file '{0}' as archive"
+ IDS_CANT_OPEN_ENCRYPTED_ARCHIVE "Can not open encrypted archive '{0}'. Wrong password?"
+END
diff --git a/CPP/7zip/UI/GUI/ExtractDialog.cpp b/CPP/7zip/UI/GUI/ExtractDialog.cpp
index 3345b7df..876fbbba 100755
--- a/CPP/7zip/UI/GUI/ExtractDialog.cpp
+++ b/CPP/7zip/UI/GUI/ExtractDialog.cpp
@@ -13,15 +13,15 @@
#include "Windows/ResourceString.h"
#ifndef NO_REGISTRY
-#include "../../FileManager/HelpUtils.h"
+#include "../FileManager/HelpUtils.h"
#endif
#include "../Common/ZipRegistry.h"
-#include "../../FileManager/LangUtils.h"
+#include "../FileManager/LangUtils.h"
-#include "../Resource/Extract/resource.h"
-#include "../Resource/ExtractDialog/resource.h"
+#include "ExtractRes.h"
+#include "ExtractDialogRes.h"
// #include "Help/Context/Extract.h"
diff --git a/CPP/7zip/UI/GUI/ExtractDialog.h b/CPP/7zip/UI/GUI/ExtractDialog.h
index 0020c693..6ac82f74 100755
--- a/CPP/7zip/UI/GUI/ExtractDialog.h
+++ b/CPP/7zip/UI/GUI/ExtractDialog.h
@@ -3,7 +3,7 @@
#ifndef __EXTRACTDIALOG_H
#define __EXTRACTDIALOG_H
-#include "resource.h"
+#include "ExtractDialogRes.h"
#include "Windows/Control/Dialog.h"
#include "Windows/Control/Edit.h"
diff --git a/CPP/7zip/UI/GUI/ExtractDialog.rc b/CPP/7zip/UI/GUI/ExtractDialog.rc
new file mode 100755
index 00000000..f1d50317
--- /dev/null
+++ b/CPP/7zip/UI/GUI/ExtractDialog.rc
@@ -0,0 +1,80 @@
+#include "ExtractDialogRes.h"
+#include "../../GuiCommon.rc"
+
+#define xSize2 285
+#define ySize2 204
+
+#define xSize (xSize2 + marg + marg)
+#define ySize (ySize2 + marg + marg)
+
+#undef g1XSize
+#undef g1XSize2
+#undef g1XPos2
+#undef g2XPos
+#undef g2XPos2
+#undef g2XSize
+#undef g2XSize2
+
+#define bYPos (ySize - marg - bYSize)
+
+#define g1XSize 127
+#define g1XSize2 (g1XSize - 13)
+#define g1XPos2 (marg + 7)
+
+#define gSpace 14
+#define g2XPos (marg + g1XSize + gSpace)
+#define g2XPos2 (g2XPos + 7)
+#define g2XSize (xSize2 - g1XSize - gSpace)
+#define g2XSize2 (g2XSize - 14)
+
+#define bXPos1 (xSize - marg - bXSize)
+#define bXPos2 (bXPos1 - 10 - bXSize)
+#define bXPos3 (bXPos2 - 10 - bXSize)
+
+IDD_DIALOG_EXTRACT DIALOG DISCARDABLE 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE
+CAPTION "Extract"
+MY_FONT
+BEGIN
+ LTEXT "E&xtract to:", IDC_STATIC_EXTRACT_EXTRACT_TO, marg, marg, xSize2, 8
+
+ COMBOBOX IDC_EXTRACT_COMBO_PATH, marg, 21, xSize2 - bDotsSize - 13, 126, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+
+ PUSHBUTTON "...", IDC_EXTRACT_BUTTON_SET_PATH, xSize - marg - bDotsSize, 20, bDotsSize, bYSize, WS_GROUP
+
+ GROUPBOX "Path mode",IDC_EXTRACT_PATH_MODE, marg, 44, g1XSize, 57
+ CONTROL "Full pathnames", IDC_EXTRACT_RADIO_FULL_PATHNAMES,"Button", BS_AUTORADIOBUTTON | WS_GROUP,
+ g1XPos2, 57, g1XSize2, 10
+ CONTROL "Current pathnames",IDC_EXTRACT_RADIO_CURRENT_PATHNAMES, "Button", BS_AUTORADIOBUTTON,
+ g1XPos2, 71, g1XSize2, 10
+ CONTROL "No pathnames", IDC_EXTRACT_RADIO_NO_PATHNAMES, "Button", BS_AUTORADIOBUTTON,
+ g1XPos2, 85, g1XSize2, 10
+
+ GROUPBOX "Overwrite mode",IDC_EXTRACT_OVERWRITE_MODE, g2XPos, 44, g2XSize, 88, WS_GROUP
+ CONTROL "Ask before overwrite", IDC_EXTRACT_RADIO_ASK_BEFORE_OVERWRITE, "Button", BS_AUTORADIOBUTTON | WS_GROUP,
+ g2XPos2, 57, g2XSize2, 10
+ CONTROL "Overwrite without prompt", IDC_EXTRACT_RADIO_OVERWRITE_WITHOUT_PROMPT, "Button", BS_AUTORADIOBUTTON,
+ g2XPos2, 71, g2XSize2, 10
+ CONTROL "Skip existing files", IDC_EXTRACT_RADIO_SKIP_EXISTING_FILES, "Button", BS_AUTORADIOBUTTON,
+ g2XPos2, 85, g2XSize2, 10
+ CONTROL "Auto rename", IDC_EXTRACT_RADIO_AUTO_RENAME, "Button", BS_AUTORADIOBUTTON,
+ g2XPos2, 99, g2XSize2, 10
+ CONTROL "Auto rename existing files", IDC_EXTRACT_RADIO_AUTO_RENAME_EXISTING, "Button", BS_AUTORADIOBUTTON,
+ g2XPos2,113, g2XSize2, 10
+
+ GROUPBOX "Files",IDC_EXTRACT_FILES, marg, 140, 127, 48, NOT WS_VISIBLE | WS_DISABLED | WS_GROUP
+ CONTROL "&Selected files",IDC_EXTRACT_RADIO_SELECTED_FILES, "Button", BS_AUTORADIOBUTTON | NOT WS_VISIBLE | WS_DISABLED | WS_GROUP,
+ g1XPos2, 153, g1XSize2, 10
+ CONTROL "&All files",IDC_EXTRACT_RADIO_ALL_FILES, "Button", BS_AUTORADIOBUTTON | NOT WS_VISIBLE | WS_DISABLED,
+ g1XPos2, 166, g1XSize2, 10
+
+ GROUPBOX "Password",IDC_EXTRACT_PASSWORD, g2XPos, 142, g2XSize, 46
+ EDITTEXT IDC_EXTRACT_EDIT_PASSWORD,154,153,130,14, ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "Show Password",IDC_EXTRACT_CHECK_SHOW_PASSWORD,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+ g2XPos2, 172, g2XSize2, 10
+
+ DEFPUSHBUTTON "OK", IDOK, bXPos3, bYPos, bXSize, bYSize, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, bXPos2, bYPos, bXSize, bYSize
+ PUSHBUTTON "Help", IDHELP, bXPos1, bYPos, bXSize, bYSize
+END
+
+
diff --git a/CPP/7zip/UI/GUI/ExtractDialogRes.h b/CPP/7zip/UI/GUI/ExtractDialogRes.h
new file mode 100755
index 00000000..bc45ed23
--- /dev/null
+++ b/CPP/7zip/UI/GUI/ExtractDialogRes.h
@@ -0,0 +1,28 @@
+#define IDD_DIALOG_EXTRACT 137
+
+#define IDC_STATIC_EXTRACT_EXTRACT_TO 1020
+#define IDC_EXTRACT_COMBO_PATH 1021
+#define IDC_EXTRACT_BUTTON_SET_PATH 1022
+
+
+#define IDC_EXTRACT_PATH_MODE 1040
+#define IDC_EXTRACT_RADIO_FULL_PATHNAMES 1041
+#define IDC_EXTRACT_RADIO_CURRENT_PATHNAMES 1042
+#define IDC_EXTRACT_RADIO_NO_PATHNAMES 1043
+
+#define IDC_EXTRACT_OVERWRITE_MODE 1050
+#define IDC_EXTRACT_RADIO_ASK_BEFORE_OVERWRITE 1051
+#define IDC_EXTRACT_RADIO_OVERWRITE_WITHOUT_PROMPT 1052
+#define IDC_EXTRACT_RADIO_SKIP_EXISTING_FILES 1053
+#define IDC_EXTRACT_RADIO_SELECTED_FILES 1054
+#define IDC_EXTRACT_RADIO_ALL_FILES 1055
+#define IDC_EXTRACT_RADIO_AUTO_RENAME 1056
+#define IDC_EXTRACT_RADIO_AUTO_RENAME_EXISTING 1057
+
+
+#define IDC_EXTRACT_FILES 1060
+
+#define IDC_EXTRACT_PASSWORD 1100
+#define IDC_EXTRACT_EDIT_PASSWORD 1101
+#define IDC_EXTRACT_CHECK_SHOW_PASSWORD 1102
+
diff --git a/CPP/7zip/UI/GUI/ExtractGUI.cpp b/CPP/7zip/UI/GUI/ExtractGUI.cpp
index b73f9870..7936fa86 100755
--- a/CPP/7zip/UI/GUI/ExtractGUI.cpp
+++ b/CPP/7zip/UI/GUI/ExtractGUI.cpp
@@ -5,19 +5,21 @@
#include "ExtractGUI.h"
#include "Common/StringConvert.h"
+#include "Common/IntToString.h"
#include "Windows/FileDir.h"
#include "Windows/Error.h"
#include "Windows/FileFind.h"
#include "Windows/Thread.h"
-#include "../../FileManager/FormatUtils.h"
-#include "../../FileManager/ExtractCallback.h"
-#include "../../FileManager/LangUtils.h"
+#include "../FileManager/FormatUtils.h"
+#include "../FileManager/ExtractCallback.h"
+#include "../FileManager/LangUtils.h"
#include "../Common/ArchiveExtractCallback.h"
#include "../Explorer/MyMessages.h"
-#include "../Resource/Extract/resource.h"
+#include "resource.h"
+#include "ExtractRes.h"
#include "OpenCallbackGUI.h"
#include "ExtractDialog.h"
@@ -36,7 +38,7 @@ struct CThreadExtracting
const CExtractOptions *Options;
COpenCallbackGUI *OpenCallback;
CMyComPtr<IExtractCallbackUI> ExtractCallback;
-
+ CDecompressStat Stat;
UString ErrorMessage;
HRESULT Result;
@@ -48,7 +50,7 @@ struct CThreadExtracting
Result = DecompressArchives(
codecs,
*ArchivePaths, *ArchivePathsFull,
- *WildcardCensor, *Options, OpenCallback, ExtractCallback, ErrorMessage);
+ *WildcardCensor, *Options, OpenCallback, ExtractCallback, ErrorMessage, Stat);
}
catch(const UString &s)
{
@@ -78,6 +80,34 @@ struct CThreadExtracting
}
};
+#ifndef _SFX
+
+static void AddValuePair(UINT resourceID, UInt32 langID, UInt64 value, UString &s)
+{
+ wchar_t sz[32];
+ s += LangString(resourceID, langID);
+ s += L" ";
+ ConvertUInt64ToString(value, sz);
+ s += sz;
+ s += L"\n";
+}
+
+static void AddSizePair(UINT resourceID, UInt32 langID, UInt64 value, UString &s)
+{
+ wchar_t sz[32];
+ s += LangString(resourceID, langID);
+ s += L" ";
+ ConvertUInt64ToString(value, sz);
+ s += sz;
+ ConvertUInt64ToString(value >> 20, sz);
+ s += L" (";
+ s += sz;
+ s += L" MB)";
+ s += L"\n";
+}
+
+#endif
+
HRESULT ExtractGUI(
CCodecs *codecs,
UStringVector &archivePaths,
@@ -162,8 +192,16 @@ HRESULT ExtractGUI(
extracter.ExtractCallbackSpec->NumArchiveErrors == 0)
{
#ifndef _SFX
- MessageBoxW(0, LangString(IDS_MESSAGE_NO_ERRORS, 0x02000608),
- LangString(IDS_PROGRESS_TESTING, 0x02000F90), 0);
+ UString s;
+ AddValuePair(IDS_ARCHIVES_COLON, 0x02000324, extracter.Stat.NumArchives, s);
+ AddValuePair(IDS_FOLDERS_COLON, 0x02000321, extracter.Stat.NumFolders, s);
+ AddValuePair(IDS_FILES_COLON, 0x02000320, extracter.Stat.NumFiles, s);
+ AddSizePair(IDS_SIZE_COLON, 0x02000322, extracter.Stat.UnpackSize, s);
+ AddSizePair(IDS_COMPRESSED_COLON, 0x02000323, extracter.Stat.PackSize, s);
+ s += L"\n";
+ s += LangString(IDS_MESSAGE_NO_ERRORS, 0x02000608);
+
+ MessageBoxW(0, s, LangString(IDS_PROGRESS_TESTING, 0x02000F90), 0);
#endif
}
if (extracter.Result != S_OK)
diff --git a/CPP/7zip/UI/GUI/ExtractGUI.h b/CPP/7zip/UI/GUI/ExtractGUI.h
index 281fcc43..dfc59945 100755
--- a/CPP/7zip/UI/GUI/ExtractGUI.h
+++ b/CPP/7zip/UI/GUI/ExtractGUI.h
@@ -6,7 +6,7 @@
#include "../Common/Extract.h"
#include "OpenCallbackGUI.h"
-#include "../../FileManager/ExtractCallback.h"
+#include "../FileManager/ExtractCallback.h"
HRESULT ExtractGUI(
CCodecs *codecs,
diff --git a/CPP/7zip/UI/GUI/ExtractRes.h b/CPP/7zip/UI/GUI/ExtractRes.h
new file mode 100755
index 00000000..917c0a34
--- /dev/null
+++ b/CPP/7zip/UI/GUI/ExtractRes.h
@@ -0,0 +1,15 @@
+#define IDS_CANNOT_CREATE_FOLDER 200
+#define IDS_OPEN_IS_NOT_SUPORTED_ARCHIVE 201
+
+#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC 202
+#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR 203
+#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_UNSUPPORTED_METHOD 204
+#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC_ENCRYPTED 205
+#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED 206
+
+#define IDS_EXTRACT_SET_FOLDER 207
+#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CANNOT_OPEN_FILE 208
+#define IDS_PROGRESS_EXTRACTING 209
+
+#define IDS_CANT_OPEN_ARCHIVE 103
+#define IDS_CANT_OPEN_ENCRYPTED_ARCHIVE 104
diff --git a/CPP/7zip/UI/GUI/GUI.cpp b/CPP/7zip/UI/GUI/GUI.cpp
index 4f06ff93..65b7fafa 100755
--- a/CPP/7zip/UI/GUI/GUI.cpp
+++ b/CPP/7zip/UI/GUI/GUI.cpp
@@ -27,17 +27,17 @@ extern "C"
#include "../../IStream.h"
#include "../../IPassword.h"
-#include "../../FileManager/StringUtils.h"
+#include "../FileManager/StringUtils.h"
#include "../Common/ExitCode.h"
#include "../Common/ArchiveCommandLine.h"
-#include "../Resource/Extract/resource.h"
+#include "ExtractRes.h"
#include "../Explorer/MyMessages.h"
#include "ExtractGUI.h"
#include "UpdateGUI.h"
-#include "Resource/BenchmarkDialog/BenchmarkDialog.h"
+#include "BenchmarkDialog.h"
using namespace NWindows;
@@ -110,6 +110,7 @@ int Main2()
{
CExtractCallbackImp *ecs = new CExtractCallbackImp;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
+ ecs->ProgressDialog.CompressingMode = false;
ecs->PasswordIsDefined = options.PasswordEnabled;
ecs->Password = options.Password;
ecs->Init();
diff --git a/CPP/7zip/UI/GUI/GUI.dsp b/CPP/7zip/UI/GUI/GUI.dsp
index 54e70732..4a5ad512 100755
--- a/CPP/7zip/UI/GUI/GUI.dsp
+++ b/CPP/7zip/UI/GUI/GUI.dsp
@@ -384,11 +384,11 @@ SOURCE=..\Explorer\MyMessages.h
# PROP Default_Filter ""
# Begin Source File
-SOURCE=..\..\FileManager\Resource\ProgressDialog2\ProgressDialog.cpp
+SOURCE=..\FileManager\ProgressDialog2.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\Resource\ProgressDialog2\ProgressDialog.h
+SOURCE=..\FileManager\ProgressDialog2.h
# End Source File
# End Group
# Begin Group "Messages"
@@ -396,11 +396,11 @@ SOURCE=..\..\FileManager\Resource\ProgressDialog2\ProgressDialog.h
# PROP Default_Filter ""
# Begin Source File
-SOURCE=..\..\FileManager\Resource\MessagesDialog\MessagesDialog.cpp
+SOURCE=..\FileManager\MessagesDialog.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\Resource\MessagesDialog\MessagesDialog.h
+SOURCE=..\FileManager\MessagesDialog.h
# End Source File
# End Group
# Begin Group "Overwtite"
@@ -408,11 +408,11 @@ SOURCE=..\..\FileManager\Resource\MessagesDialog\MessagesDialog.h
# PROP Default_Filter ""
# Begin Source File
-SOURCE=..\..\FileManager\Resource\OverwriteDialog\OverwriteDialog.cpp
+SOURCE=..\FileManager\OverwriteDialog.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\Resource\OverwriteDialog\OverwriteDialog.h
+SOURCE=..\FileManager\OverwriteDialog.h
# End Source File
# End Group
# Begin Group "Password"
@@ -420,11 +420,11 @@ SOURCE=..\..\FileManager\Resource\OverwriteDialog\OverwriteDialog.h
# PROP Default_Filter ""
# Begin Source File
-SOURCE=..\..\FileManager\Resource\PasswordDialog\PasswordDialog.cpp
+SOURCE=..\FileManager\PasswordDialog.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\Resource\PasswordDialog\PasswordDialog.h
+SOURCE=..\FileManager\PasswordDialog.h
# End Source File
# End Group
# Begin Group "Compress Dialog"
@@ -456,11 +456,11 @@ SOURCE=.\ExtractDialog.h
# PROP Default_Filter ""
# Begin Source File
-SOURCE=.\Resource\BenchmarkDialog\BenchmarkDialog.cpp
+SOURCE=.\BenchmarkDialog.cpp
# End Source File
# Begin Source File
-SOURCE=.\Resource\BenchmarkDialog\BenchmarkDialog.h
+SOURCE=.\BenchmarkDialog.h
# End Source File
# End Group
# End Group
@@ -469,87 +469,79 @@ SOURCE=.\Resource\BenchmarkDialog\BenchmarkDialog.h
# PROP Default_Filter ""
# Begin Source File
-SOURCE=..\..\FileManager\ExtractCallback.cpp
+SOURCE=..\FileManager\ExtractCallback.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\ExtractCallback.h
+SOURCE=..\FileManager\ExtractCallback.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\FolderInterface.h
+SOURCE=..\FileManager\FolderInterface.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\FormatUtils.cpp
+SOURCE=..\FileManager\FormatUtils.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\FormatUtils.h
+SOURCE=..\FileManager\FormatUtils.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\HelpUtils.cpp
+SOURCE=..\FileManager\HelpUtils.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\HelpUtils.h
+SOURCE=..\FileManager\HelpUtils.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\LangUtils.cpp
+SOURCE=..\FileManager\LangUtils.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\LangUtils.h
+SOURCE=..\FileManager\LangUtils.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\OpenCallback.cpp
+SOURCE=..\FileManager\OpenCallback.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\OpenCallback.h
+SOURCE=..\FileManager\OpenCallback.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\ProgramLocation.cpp
+SOURCE=..\FileManager\ProgramLocation.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\ProgramLocation.h
+SOURCE=..\FileManager\ProgramLocation.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\RegistryUtils.cpp
+SOURCE=..\FileManager\RegistryUtils.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\RegistryUtils.h
+SOURCE=..\FileManager\RegistryUtils.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\SplitUtils.cpp
+SOURCE=..\FileManager\SplitUtils.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\SplitUtils.h
+SOURCE=..\FileManager\SplitUtils.h
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\StringUtils.cpp
+SOURCE=..\FileManager\StringUtils.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\FileManager\StringUtils.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\FileManager\UpdateCallback100.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\FileManager\UpdateCallback100.h
+SOURCE=..\FileManager\StringUtils.h
# End Source File
# End Group
# Begin Group "Engine"
@@ -613,6 +605,14 @@ SOURCE=..\..\Common\FileStreams.h
# End Source File
# Begin Source File
+SOURCE=..\..\Common\ProgressUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\ProgressUtils.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Common\StreamUtils.cpp
# End Source File
# Begin Source File
diff --git a/CPP/7zip/UI/GUI/OpenCallbackGUI.cpp b/CPP/7zip/UI/GUI/OpenCallbackGUI.cpp
index bc6cf393..ae204d17 100755
--- a/CPP/7zip/UI/GUI/OpenCallbackGUI.cpp
+++ b/CPP/7zip/UI/GUI/OpenCallbackGUI.cpp
@@ -9,7 +9,7 @@
#include "Common/StringConvert.h"
#ifndef _NO_CRYPTO
-#include "../../FileManager/Resource/PasswordDialog/PasswordDialog.h"
+#include "../FileManager/PasswordDialog.h"
#endif
HRESULT COpenCallbackGUI::CheckBreak()
diff --git a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/StdAfx.h b/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/StdAfx.h
deleted file mode 100755
index a444ca31..00000000
--- a/CPP/7zip/UI/GUI/Resource/BenchmarkDialog/StdAfx.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// stdafx.h
-
-#ifndef __STDAFX_H
-#define __STDAFX_H
-
-#define _WIN32_WINNT 0x0400
-
-// it's for Windows NT supporting (MENUITEMINFOW)
-#define WINVER 0x0400
-
-#include <windows.h>
-#include <commctrl.h>
-
-#include "Common/NewHandler.h"
-
-#endif
diff --git a/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp b/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp
index eff29953..a17f0cac 100755
--- a/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp
+++ b/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp
@@ -10,8 +10,8 @@
#include "Windows/PropVariant.h"
#include "Windows/Error.h"
-#include "../../FileManager/Resource/MessagesDialog/MessagesDialog.h"
-#include "../../FileManager/Resource/PasswordDialog/PasswordDialog.h"
+#include "../FileManager/MessagesDialog.h"
+#include "../FileManager/PasswordDialog.h"
using namespace NWindows;
@@ -30,6 +30,7 @@ void CUpdateCallbackGUI::Init()
FailedFiles.Clear();
Messages.Clear();
NumArchiveErrors = 0;
+ NumFiles = 0;
}
void CUpdateCallbackGUI::AddErrorMessage(LPCWSTR message)
@@ -102,6 +103,12 @@ HRESULT CUpdateCallbackGUI::Finilize()
return S_OK;
}
+HRESULT CUpdateCallbackGUI::SetNumFiles(UInt64 numFiles)
+{
+ ProgressDialog.ProgressSynch.SetNumFilesTotal(numFiles);
+ return S_OK;
+}
+
HRESULT CUpdateCallbackGUI::SetTotal(UInt64 total)
{
ProgressDialog.ProgressSynch.SetProgress(total, 0);
@@ -116,6 +123,13 @@ HRESULT CUpdateCallbackGUI::SetCompleted(const UInt64 *completeValue)
return S_OK;
}
+HRESULT CUpdateCallbackGUI::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
+{
+ RINOK(CheckBreak());
+ ProgressDialog.ProgressSynch.SetRatioInfo(inSize, outSize);
+ return S_OK;
+}
+
HRESULT CUpdateCallbackGUI::GetStream(const wchar_t *name, bool /* isAnti */)
{
ProgressDialog.ProgressSynch.SetCurrentFileName(name);
@@ -135,6 +149,8 @@ HRESULT CUpdateCallbackGUI::OpenFileError(const wchar_t *name, DWORD systemError
HRESULT CUpdateCallbackGUI::SetOperationResult(Int32 /* operationResult */)
{
+ NumFiles++;
+ ProgressDialog.ProgressSynch.SetNumFilesCur(NumFiles);
return S_OK;
}
diff --git a/CPP/7zip/UI/GUI/UpdateCallbackGUI.h b/CPP/7zip/UI/GUI/UpdateCallbackGUI.h
index 16f0220c..dc370638 100755
--- a/CPP/7zip/UI/GUI/UpdateCallbackGUI.h
+++ b/CPP/7zip/UI/GUI/UpdateCallbackGUI.h
@@ -4,7 +4,7 @@
#define __UPDATE_CALLBACK_GUI_H
#include "../Common/Update.h"
-#include "../../FileManager/Resource/ProgressDialog2/ProgressDialog.h"
+#include "../FileManager/ProgressDialog2.h"
class CUpdateCallbackGUI: public IUpdateCallbackUI2
{
@@ -13,6 +13,7 @@ public:
bool PasswordIsDefined;
UString Password;
bool AskPassword;
+ UInt64 NumFiles;
CUpdateCallbackGUI():
PasswordIsDefined(false),
@@ -24,24 +25,7 @@ public:
~CUpdateCallbackGUI();
void Init();
- HRESULT OpenResult(const wchar_t *name, HRESULT result);
-
- HRESULT StartScanning();
- HRESULT CanNotFindError(const wchar_t *name, DWORD systemError);
- HRESULT FinishScanning();
-
- HRESULT StartArchive(const wchar_t *name, bool updating);
- HRESULT FinishArchive();
-
- HRESULT CheckBreak();
- HRESULT Finilize();
- HRESULT SetTotal(UInt64 total);
- HRESULT SetCompleted(const UInt64 *completeValue);
-
- HRESULT GetStream(const wchar_t *name, bool isAnti);
- HRESULT OpenFileError(const wchar_t *name, DWORD systemError);
- HRESULT SetOperationResult(Int32 operationResult);
- HRESULT CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password);
+ INTERFACE_IUpdateCallbackUI2(;)
// HRESULT CloseProgress();
diff --git a/CPP/7zip/UI/GUI/UpdateGUI.cpp b/CPP/7zip/UI/GUI/UpdateGUI.cpp
index b446b4c5..ca89c7c9 100755
--- a/CPP/7zip/UI/GUI/UpdateGUI.cpp
+++ b/CPP/7zip/UI/GUI/UpdateGUI.cpp
@@ -14,14 +14,14 @@
#include "Windows/FileFind.h"
#include "Windows/Thread.h"
-#include "../../FileManager/FormatUtils.h"
-#include "../../FileManager/ExtractCallback.h"
-#include "../../FileManager/StringUtils.h"
+#include "../FileManager/FormatUtils.h"
+#include "../FileManager/ExtractCallback.h"
+#include "../FileManager/StringUtils.h"
#include "../Common/ArchiveExtractCallback.h"
#include "../Common/WorkDir.h"
#include "../Explorer/MyMessages.h"
-#include "../Resource/Extract/resource.h"
+#include "ExtractRes.h"
#include "OpenCallbackGUI.h"
#include "CompressDialog.h"
diff --git a/CPP/7zip/UI/GUI/UpdateGUI.h b/CPP/7zip/UI/GUI/UpdateGUI.h
index 0d9d7bcd..db58877b 100755
--- a/CPP/7zip/UI/GUI/UpdateGUI.h
+++ b/CPP/7zip/UI/GUI/UpdateGUI.h
@@ -7,7 +7,7 @@
#include "OpenCallbackGUI.h"
#include "UpdateCallbackGUI.h"
-#include "../../FileManager/UpdateCallback100.h"
+#include "../FileManager/UpdateCallback100.h"
HRESULT UpdateGUI(
CCodecs *codecs,
diff --git a/CPP/7zip/UI/GUI/makefile b/CPP/7zip/UI/GUI/makefile
index cc672b46..f321e560 100755
--- a/CPP/7zip/UI/GUI/makefile
+++ b/CPP/7zip/UI/GUI/makefile
@@ -10,6 +10,7 @@ CFLAGS = $(CFLAGS) -I ../../../ \
-D_7ZIP_LARGE_PAGES \
GUI_OBJS = \
+ $O\BenchmarkDialog.obj \
$O\CompressDialog.obj \
$O\ExtractDialog.obj \
$O\ExtractGUI.obj \
@@ -60,6 +61,7 @@ WIN_CTRL_OBJS = \
7ZIP_COMMON_OBJS = \
$O\FilePathAutoRename.obj \
$O\FileStreams.obj \
+ $O\ProgressUtils.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \
@@ -97,7 +99,10 @@ FM_OBJS = \
$O\RegistryUtils.obj \
$O\SplitUtils.obj \
$O\StringUtils.obj \
- $O\UpdateCallback100.obj \
+ $O\MessagesDialog.obj \
+ $O\OverwriteDialog.obj \
+ $O\PasswordDialog.obj \
+ $O\ProgressDialog2.obj \
C_OBJS = \
$O\Alloc.obj \
@@ -115,11 +120,6 @@ OBJS = \
$(UI_COMMON_OBJS) \
$(FM_OBJS)\
$O\MyMessages.obj \
- $O\MessagesDialog.obj \
- $O\OverwriteDialog.obj \
- $O\PasswordDialog.obj \
- $O\ProgressDialog.obj \
- $O\BenchmarkDialog.obj \
$O\CopyCoder.obj \
$(LZMA_BENCH_OBJS) \
$(C_OBJS) \
@@ -140,20 +140,10 @@ $(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(UI_COMMON_OBJS): ../Common/$(*B).cpp
$(COMPL)
-$(FM_OBJS): ../../FileManager/$(*B).cpp
+$(FM_OBJS): ../FileManager/$(*B).cpp
$(COMPL)
$O\MyMessages.obj: ../Explorer/MyMessages.cpp
$(COMPL)
-$O\MessagesDialog.obj: ../../FileManager/Resource/MessagesDialog/$(*B).cpp
- $(COMPL)
-$O\OverwriteDialog.obj: ../../FileManager/Resource/OverwriteDialog./$(*B).cpp
- $(COMPL)
-$O\PasswordDialog.obj: ../../FileManager/Resource/PasswordDialog/$(*B).cpp
- $(COMPL)
-$O\ProgressDialog.obj: ../../FileManager/Resource/ProgressDialog2/$(*B).cpp
- $(COMPL)
-$O\BenchmarkDialog.obj: Resource/BenchmarkDialog/$(*B).cpp
- $(COMPL)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
diff --git a/CPP/7zip/UI/GUI/resource.h b/CPP/7zip/UI/GUI/resource.h
index d505afe0..08517dec 100755
--- a/CPP/7zip/UI/GUI/resource.h
+++ b/CPP/7zip/UI/GUI/resource.h
@@ -41,7 +41,12 @@
#define IDS_PASSWORD_PASSWORDS_DO_NOT_MATCH 111
#define IDS_PASSWORD_IS_TOO_LONG 112
-#define IDD_DIALOG_EXTRACT 137
+#define IDS_FILES_COLON 2274
+#define IDS_FOLDERS_COLON 2275
+#define IDS_SIZE_COLON 2276
+#define IDS_COMPRESSED_COLON 2277
+#define IDS_ARCHIVES_COLON 2278
+
#define IDB_DELETE 149
#define IDC_LIST1 1067
#define IDC_COLUMN_EDIT_WIDTH 1068
diff --git a/CPP/7zip/UI/GUI/resource.rc b/CPP/7zip/UI/GUI/resource.rc
index ba93ac43..7782e178 100755
--- a/CPP/7zip/UI/GUI/resource.rc
+++ b/CPP/7zip/UI/GUI/resource.rc
@@ -48,14 +48,21 @@ BEGIN
IDS_ERROR "Error"
IDS_MESSAGE_NO_ERRORS "There are no errors"
IDS_CONFIG_DIALOG_CAPTION "7-Zip Options"
+
+ IDS_FILES_COLON "Files:"
+ IDS_FOLDERS_COLON "Folders:"
+ IDS_SIZE_COLON "Size:"
+ IDS_COMPRESSED_COLON "Compressed size:"
+ IDS_ARCHIVES_COLON "Archives:"
+
END
-#include "../../FileManager/Resource/PropertyName/resource.rc"
-#include "../../FileManager/Resource/OverwriteDialog/resource.rc"
-#include "../../FileManager/Resource/PasswordDialog/resource.rc"
-#include "../../FileManager/Resource/MessagesDialog/resource.rc"
-#include "../../FileManager/Resource/ProgressDialog2/resource.rc"
-#include "../Resource/Extract/resource.rc"
-#include "../Resource/ExtractDialog/resource.rc"
-#include "../Resource/CompressDialog/resource.rc"
-#include "Resource/BenchmarkDialog/resource.rc"
+#include "../FileManager/PropertyName.rc"
+#include "../FileManager/OverwriteDialog.rc"
+#include "../FileManager/PasswordDialog.rc"
+#include "../FileManager/MessagesDialog.rc"
+#include "../FileManager/ProgressDialog2.rc"
+#include "Extract.rc"
+#include "ExtractDialog.rc"
+#include "CompressDialog.rc"
+#include "BenchmarkDialog.rc"