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>2008-08-13 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:56 +0300
commit173c07e166fdf6fcd20f18ea73008f1b628945df (patch)
tree13ebea85cdc4c16ae93714ff0627ee9f91ad7e08 /CPP/7zip/UI/GUI/CompressDialog.cpp
parent3901bf0ab88106a5b031cba7bc18d60cdebf7eef (diff)
4.59 beta
Diffstat (limited to 'CPP/7zip/UI/GUI/CompressDialog.cpp')
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialog.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/CPP/7zip/UI/GUI/CompressDialog.cpp b/CPP/7zip/UI/GUI/CompressDialog.cpp
index 51d215bc..9634ba02 100755
--- a/CPP/7zip/UI/GUI/CompressDialog.cpp
+++ b/CPP/7zip/UI/GUI/CompressDialog.cpp
@@ -26,7 +26,7 @@
extern bool g_IsNT;
#endif
-#ifdef LANG
+#ifdef LANG
#include "../FileManager/LangUtils.h"
#endif
@@ -34,8 +34,8 @@ extern bool g_IsNT;
#define MY_SIZE_OF_ARRAY(x) (sizeof(x) / sizeof(x[0]))
-#ifdef LANG
-static CIDLangPair kIDLangPairs[] =
+#ifdef LANG
+static CIDLangPair kIDLangPairs[] =
{
{ IDC_STATIC_COMPRESS_ARCHIVE, 0x02000D01 },
{ IDC_STATIC_COMPRESS_FORMAT, 0x02000D03 },
@@ -94,7 +94,7 @@ enum ELevel
kUltra = 9
};
-static const CLevelInfo g_Levels[] =
+static const CLevelInfo g_Levels[] =
{
{ IDS_METHOD_STORE, 0x02000D81 },
{ IDS_METHOD_FASTEST, 0x02000D85 },
@@ -118,7 +118,7 @@ enum EMethodID
kDeflate64
};
-static const LPCWSTR kMethodsNames[] =
+static const LPCWSTR kMethodsNames[] =
{
L"Copy",
L"LZMA",
@@ -128,33 +128,33 @@ static const LPCWSTR kMethodsNames[] =
L"Deflate64"
};
-static const EMethodID g_7zMethods[] =
+static const EMethodID g_7zMethods[] =
{
kLZMA,
kPPMd,
kBZip2
};
-static const EMethodID g_7zSfxMethods[] =
+static const EMethodID g_7zSfxMethods[] =
{
kCopy,
kLZMA,
kPPMd
};
-static EMethodID g_ZipMethods[] =
+static EMethodID g_ZipMethods[] =
{
kDeflate,
kDeflate64,
kBZip2
};
-static EMethodID g_GZipMethods[] =
+static EMethodID g_GZipMethods[] =
{
kDeflate
};
-static EMethodID g_BZip2Methods[] =
+static EMethodID g_BZip2Methods[] =
{
kBZip2
};
@@ -173,42 +173,42 @@ struct CFormatInfo
bool EncryptFileNames;
};
-static const CFormatInfo g_Formats[] =
+static const CFormatInfo g_Formats[] =
{
- {
- L"",
- (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
+ {
+ L"",
+ (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
0, 0,
false, false, false, false, false, false
},
- {
- k7zFormat,
- (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
+ {
+ k7zFormat,
+ (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
g_7zMethods, MY_SIZE_OF_ARRAY(g_7zMethods),
true, true, true, true, true, true
},
- {
- L"Zip",
- (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
+ {
+ L"Zip",
+ (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
g_ZipMethods, MY_SIZE_OF_ARRAY(g_ZipMethods) ,
false, false, true, false, true, false
},
- {
- L"GZip",
- (1 << 1) | (1 << 5) | (1 << 7) | (1 << 9),
+ {
+ L"GZip",
+ (1 << 1) | (1 << 5) | (1 << 7) | (1 << 9),
g_GZipMethods, MY_SIZE_OF_ARRAY(g_GZipMethods),
false, false, false, false, false, false
},
- {
- L"BZip2",
+ {
+ L"BZip2",
(1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
- g_BZip2Methods,
+ g_BZip2Methods,
MY_SIZE_OF_ARRAY(g_BZip2Methods),
false, false, true, false, false
},
- {
- L"Tar",
- (1 << 0),
+ {
+ L"Tar",
+ (1 << 0),
0, 0,
false, false, false, false, false, false
}
@@ -236,9 +236,9 @@ static UInt64 GetMaxRamSizeForProgram()
return physSize;
}
-bool CCompressDialog::OnInit()
+bool CCompressDialog::OnInit()
{
- #ifdef LANG
+ #ifdef LANG
LangSetWindowText(HWND(*this), 0x02000D00);
LangSetDlgItemsText(HWND(*this), kIDLangPairs, MY_SIZE_OF_ARRAY(kIDLangPairs) );
#endif
@@ -410,7 +410,7 @@ void CCompressDialog::CheckControlsEnable()
EnableItem(IDC_COMPRESS_COMBO_ENCRYPTION_METHOD, fi.Encrypt);
EnableItem(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, fi.EncryptFileNames);
- ShowItem(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, fi.EncryptFileNames);
+ ShowItem(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, fi.EncryptFileNames ? SW_SHOW : SW_HIDE);
}
bool CCompressDialog::IsSFX()
@@ -454,7 +454,7 @@ void CCompressDialog::OnButtonSFX()
CheckVolumeEnable();
}
-void CCompressDialog::OnButtonSetArchive()
+void CCompressDialog::OnButtonSetArchive()
{
UString fileName;
m_ArchivePath.GetText(fileName);
@@ -489,14 +489,14 @@ static bool IsAsciiString(const UString &s)
return true;
}
-void CCompressDialog::OnOK()
+void CCompressDialog::OnOK()
{
_password1Control.GetText(Info.Password);
if (IsZipFormat())
{
if (!IsAsciiString(Info.Password))
{
- MyMessageBoxResource(*this, IDS_PASSWORD_USE_ASCII, 0x02000B11);
+ ShowErrorMessageHwndRes(*this, IDS_PASSWORD_USE_ASCII, 0x02000B11);
return;
}
UString method = GetEncryptionMethodSpec();
@@ -505,7 +505,7 @@ void CCompressDialog::OnOK()
{
if (Info.Password.Length() > 99)
{
- MyMessageBoxResource(*this, IDS_PASSWORD_IS_TOO_LONG, 0x02000B12);
+ ShowErrorMessageHwndRes(*this, IDS_PASSWORD_IS_TOO_LONG, 0x02000B12);
return;
}
}
@@ -516,7 +516,7 @@ void CCompressDialog::OnOK()
_password2Control.GetText(password2);
if (password2 != Info.Password)
{
- MyMessageBoxResource(*this, IDS_PASSWORD_PASSWORDS_DO_NOT_MATCH, 0x02000B10);
+ ShowErrorMessageHwndRes(*this, IDS_PASSWORD_PASSWORDS_DO_NOT_MATCH, 0x02000B10);
return;
}
}
@@ -558,7 +558,7 @@ void CCompressDialog::OnOK()
{
if (!ParseVolumeSizes(volumeString, Info.VolumeSizes))
{
- MyMessageBoxResource(*this, IDS_COMPRESS_INCORRECT_VOLUME_SIZE, 0x02000D41);
+ ShowErrorMessageHwndRes(*this, IDS_COMPRESS_INCORRECT_VOLUME_SIZE, 0x02000D41);
return;
}
if (!Info.VolumeSizes.IsEmpty())
@@ -568,7 +568,7 @@ void CCompressDialog::OnOK()
{
wchar_t s[32];
ConvertUInt64ToString(volumeSize, s);
- if (::MessageBoxW(*this, MyFormatNew(IDS_COMPRESS_SPLIT_CONFIRM_MESSAGE, 0x02000D42, s),
+ if (::MessageBoxW(*this, MyFormatNew(IDS_COMPRESS_SPLIT_CONFIRM_MESSAGE, 0x02000D42, s),
L"7-Zip", MB_YESNOCANCEL | MB_ICONQUESTION | MB_TASKMODAL) != IDYES)
return;
}
@@ -595,7 +595,7 @@ void CCompressDialog::OnOK()
static LPCWSTR kHelpTopic = L"fm/plugins/7-zip/add.htm";
-void CCompressDialog::OnHelp()
+void CCompressDialog::OnHelp()
{
ShowHelpWindow(NULL, kHelpTopic);
}
@@ -660,7 +660,7 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
return CModalDialog::OnCommand(code, itemID, lParam);
}
-void CCompressDialog::CheckSFXNameChange()
+void CCompressDialog::CheckSFXNameChange()
{
bool isSFX = IsSFX();
CheckSFXControlsEnable();
@@ -668,7 +668,7 @@ void CCompressDialog::CheckSFXNameChange()
SetArchiveName2(isSFX);
}
-void CCompressDialog::SetArchiveName2(bool prevWasSFX)
+void CCompressDialog::SetArchiveName2(bool prevWasSFX)
{
UString fileName;
m_ArchivePath.GetText(fileName);
@@ -797,7 +797,7 @@ void CCompressDialog::SetLevel()
SetMethod();
}
-void CCompressDialog::SetMethod()
+void CCompressDialog::SetMethod()
{
m_Method.ResetContent();
UInt32 level = GetLevel();
@@ -814,7 +814,7 @@ void CCompressDialog::SetMethod()
if (index >= 0)
{
const NCompression::CFormatOptions &fo = m_RegistryInfo.FormatOptionsVector[index];
- defaultMethod = fo.Method;
+ defaultMethod = fo.Method;
}
bool isSfx = IsSFX();
for(int m = 0; m < fi.NumMethods; m++)
@@ -838,7 +838,7 @@ bool CCompressDialog::IsZipFormat()
return (ai.Name.CompareNoCase(L"zip") == 0);
}
-void CCompressDialog::SetEncryptionMethod()
+void CCompressDialog::SetEncryptionMethod()
{
_encryptionMethod.ResetContent();
const CArcInfoEx &ai = m_ArchiverInfoList[m_Format.GetCurSel()];
@@ -854,7 +854,7 @@ void CCompressDialog::SetEncryptionMethod()
if (index >= 0)
{
const NCompression::CFormatOptions &fo = m_RegistryInfo.FormatOptionsVector[index];
- encryptionMethod = fo.EncryptionMethod;
+ encryptionMethod = fo.EncryptionMethod;
}
_encryptionMethod.AddString(TEXT("ZipCrypto"));
_encryptionMethod.AddString(TEXT("AES-256"));
@@ -1365,7 +1365,7 @@ void CCompressDialog::PrintMemUsage(UINT res, UInt64 value)
void CCompressDialog::SetMemoryUsage()
{
- UInt64 decompressMem;
+ UInt64 decompressMem;
UInt64 memUsage = GetMemoryUsage(decompressMem);
PrintMemUsage(IDC_STATIC_COMPRESS_MEMORY_VALUE, memUsage);
PrintMemUsage(IDC_STATIC_COMPRESS_MEMORY_DE_VALUE, decompressMem);