Write reuseHome to GlobalStorage.

This commit is contained in:
Teo Mrnjavac 2016-07-15 13:09:07 +02:00
parent b20e18cc26
commit 6c6e4a1f88

View File

@ -129,6 +129,7 @@ ChoicePage::ChoicePage( QWidget* parent )
m_previewAfterFrame->hide(); m_previewAfterFrame->hide();
m_encryptWidget->hide(); m_encryptWidget->hide();
m_reuseHomeCheckBox->hide(); m_reuseHomeCheckBox->hide();
Calamares::JobQueue::instance()->globalStorage()->insert( "reuseHome", false );
} }
@ -741,9 +742,16 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
m_encryptWidget->passphrase() ); m_encryptWidget->passphrase() );
Partition* homePartition = KPMHelpers::findPartitionByPath( { selectedDevice() }, Partition* homePartition = KPMHelpers::findPartitionByPath( { selectedDevice() },
homePartitionPath ); homePartitionPath );
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
if ( homePartition ) if ( homePartition )
{ {
PartitionInfo::setMountPoint( homePartition, "/home" ); PartitionInfo::setMountPoint( homePartition, "/home" );
gs->insert( "reuseHome", true );
}
else
{
gs->insert( "reuseHome", false );
} }
} }
} }
@ -861,6 +869,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
PartitionBarsView::NoNestedPartitions; PartitionBarsView::NoNestedPartitions;
m_reuseHomeCheckBox->hide(); m_reuseHomeCheckBox->hide();
Calamares::JobQueue::instance()->globalStorage()->insert( "reuseHome", false );
switch ( choice ) switch ( choice )
{ {
case Alongside: case Alongside: