diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2007-08-03 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:53 +0300 |
commit | 33ccab7e728a996800e166d849fe1e92a17e1afe (patch) | |
tree | e9d1148bae1da8127a3eefbc217aafd736fb74af /CPP/7zip/UI/GUI | |
parent | d14d4dcdefbef6695a618c3cdac05ba2ede5572e (diff) |
4.52 beta
Diffstat (limited to 'CPP/7zip/UI/GUI')
-rwxr-xr-x | CPP/7zip/UI/GUI/CompressDialog.cpp | 36 | ||||
-rwxr-xr-x | CPP/7zip/UI/GUI/CompressDialog.h | 1 |
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); |