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-03 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:53 +0300
commit33ccab7e728a996800e166d849fe1e92a17e1afe (patch)
treee9d1148bae1da8127a3eefbc217aafd736fb74af /CPP/7zip/UI/GUI
parentd14d4dcdefbef6695a618c3cdac05ba2ede5572e (diff)
4.52 beta
Diffstat (limited to 'CPP/7zip/UI/GUI')
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialog.cpp36
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialog.h1
2 files changed, 14 insertions, 23 deletions
diff --git a/CPP/7zip/UI/GUI/CompressDialog.cpp b/CPP/7zip/UI/GUI/CompressDialog.cpp
index 3591b14f..99ac831d 100755
--- a/CPP/7zip/UI/GUI/CompressDialog.cpp
+++ b/CPP/7zip/UI/GUI/CompressDialog.cpp
@@ -309,6 +309,7 @@ bool CCompressDialog::OnInit()
OnButtonSFX();
SetEncryptionMethod();
+ SetMemoryUsage();
return CModalDialog::OnInit();
}
@@ -350,6 +351,7 @@ bool CCompressDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
case IDC_COMPRESS_SFX:
{
OnButtonSFX();
+ SetMemoryUsage();
return true;
}
case IDC_COMPRESS_CHECK_SHOW_PASSWORD:
@@ -604,7 +606,16 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
{
case IDC_COMPRESS_COMBO_FORMAT:
{
- OnChangeFormat();
+ bool isSFX = IsSFX();
+ SaveOptionsInMem();
+ SetLevel();
+ SetSolidBlockSize();
+ SetNumThreads();
+ SetParams();
+ CheckControlsEnable();
+ SetArchiveName2(isSFX);
+ SetEncryptionMethod();
+ SetMemoryUsage();
return true;
}
case IDC_COMPRESS_COMBO_LEVEL:
@@ -617,6 +628,7 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
SetSolidBlockSize();
SetNumThreads();
CheckSFXNameChange();
+ SetMemoryUsage();
return true;
}
case IDC_COMPRESS_COMBO_METHOD:
@@ -626,6 +638,7 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
SetSolidBlockSize();
SetNumThreads();
CheckSFXNameChange();
+ SetMemoryUsage();
return true;
}
case IDC_COMPRESS_COMBO_DICTIONARY:
@@ -673,19 +686,6 @@ void CCompressDialog::SetArchiveName2(bool prevWasSFX)
SetArchiveName(fileName);
}
-void CCompressDialog::OnChangeFormat()
-{
- bool isSFX = IsSFX();
- SaveOptionsInMem();
- SetLevel();
- SetSolidBlockSize();
- SetNumThreads();
- SetParams();
- CheckControlsEnable();
- SetArchiveName2(isSFX);
- SetEncryptionMethod();
-}
-
// if type.KeepName then use OriginalFileName
// else if !KeepName remove extension
// add new extension
@@ -939,10 +939,7 @@ void CCompressDialog::SetDictionary()
int methodID = GetMethodID();
UInt32 level = GetLevel2();
if (methodID < 0)
- {
- SetMemoryUsage();
return;
- }
const UInt64 maxRamSize = GetMaxRamSizeForProgram();
switch (methodID)
{
@@ -1042,7 +1039,6 @@ void CCompressDialog::SetDictionary()
break;
}
}
- SetMemoryUsage();
}
UInt32 CCompressDialog::GetComboValue(NWindows::NControl::CComboBox &c, int defMax)
@@ -1084,10 +1080,7 @@ void CCompressDialog::SetOrder()
int methodID = GetMethodID();
UInt32 level = GetLevel2();
if (methodID < 0)
- {
- SetMemoryUsage();
return;
- }
switch (methodID)
{
case kLZMA:
@@ -1161,7 +1154,6 @@ void CCompressDialog::SetOrder()
break;
}
}
- SetMemoryUsage();
}
bool CCompressDialog::GetOrderMode()
diff --git a/CPP/7zip/UI/GUI/CompressDialog.h b/CPP/7zip/UI/GUI/CompressDialog.h
index cf479f0a..a23605d4 100755
--- a/CPP/7zip/UI/GUI/CompressDialog.h
+++ b/CPP/7zip/UI/GUI/CompressDialog.h
@@ -98,7 +98,6 @@ class CCompressDialog: public NWindows::NControl::CModalDialog
int FindRegistryFormat(const UString &name);
int FindRegistryFormatAlways(const UString &name);
- void OnChangeFormat();
void CheckSFXNameChange();
void SetArchiveName2(bool prevWasSFX);