From 5e547b127f25b0d4f526fdb4126b95c4ba03c4b2 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 21 Sep 2021 01:36:47 +0200 Subject: Linux/macOS: Add CLI switch (--size=max) and UI option to give a file container all available free space. This commit also makes --size switch accept KiB/MiB/GiB/TiB prefixes and adds TiB choice in UI. --- src/Main/Forms/Forms.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Main/Forms/Forms.cpp') diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index 0af3e2a6..d281febc 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -3625,6 +3625,12 @@ VolumeSizeWizardPageBase::VolumeSizeWizardPageBase( wxWindow* parent, wxWindowID bSizer99->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + UseAllFreeSpaceCheckBox = new wxCheckBox( this, wxID_ANY, _("IDC_USE_ALL_FREE_SPACE"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer99->Add( UseAllFreeSpaceCheckBox, 0, wxALL|wxEXPAND, 5 ); + + + bSizer99->Add( 0, 0, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 ); + FreeSpaceStaticText = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); FreeSpaceStaticText->Wrap( -1 ); @@ -3649,6 +3655,7 @@ VolumeSizeWizardPageBase::VolumeSizeWizardPageBase( wxWindow* parent, wxWindowID // Connect Events VolumeSizeTextCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizeTextChanged ), NULL, this ); VolumeSizePrefixChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizePrefixSelected ), NULL, this ); + UseAllFreeSpaceCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnUseAllFreeSpaceCheckBoxClick ), NULL, this ); } VolumeSizeWizardPageBase::~VolumeSizeWizardPageBase() @@ -3656,6 +3663,7 @@ VolumeSizeWizardPageBase::~VolumeSizeWizardPageBase() // Disconnect Events VolumeSizeTextCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizeTextChanged ), NULL, this ); VolumeSizePrefixChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizePrefixSelected ), NULL, this ); + UseAllFreeSpaceCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnUseAllFreeSpaceCheckBoxClick ), NULL, this ); } -- cgit v1.2.3