[partition] Add setting for requiredstorage
- If the welcome module isn't used, can set a required amount of storage for the installation here.
This commit is contained in:
parent
b5c50c8d04
commit
e6a2cb607f
@ -69,6 +69,7 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
||||
, m_widget( new QStackedWidget() )
|
||||
, m_choicePage( nullptr )
|
||||
, m_manualPartitionPage( nullptr )
|
||||
, m_requiredStorageGiB( 0.0 )
|
||||
{
|
||||
m_widget->setContentsMargins( 0, 0, 0, 0 );
|
||||
|
||||
@ -564,6 +565,9 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
|
||||
m_swapChoices = choices;
|
||||
|
||||
// Settings that overlap with the Welcome module
|
||||
m_requiredStorageGiB = CalamaresUtils::getDouble( configurationMap, "requiredStorage", -1.0 );
|
||||
|
||||
// These gs settings seem to be unused (in upstream Calamares) outside of
|
||||
// the partition module itself.
|
||||
gs->insert( "ensureSuspendToDisk", ensureSuspendToDisk );
|
||||
|
@ -86,6 +86,8 @@ private:
|
||||
QFutureWatcher<void>* m_future;
|
||||
|
||||
QSet< PartitionActions::Choices::SwapChoice > m_swapChoices;
|
||||
|
||||
qreal m_requiredStorageGiB; // May duplicate setting in the welcome module
|
||||
};
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( PartitionViewStepFactory )
|
||||
|
@ -120,3 +120,15 @@ defaultFileSystemType: "ext4"
|
||||
# % of the available drive space if a '%' is appended to the value
|
||||
# - minSize: minimum partition size (optional parameter)
|
||||
# - maxSize: maximum partition size (optional parameter)
|
||||
|
||||
# Checking for available storage
|
||||
#
|
||||
# This overlaps with the setting of the same name in the welcome module's
|
||||
# requirements section. If nothing is set by the welcome module, this
|
||||
# value is used instead. It is still a problem if there is no required
|
||||
# size set at all, and the replace and resize options will not be offered
|
||||
# if no required size is set.
|
||||
#
|
||||
# The value is in Gibibytes (GiB).
|
||||
#
|
||||
# requiredStorage: 3.5
|
||||
|
Loading…
Reference in New Issue
Block a user