|
|
@ -28,7 +28,6 @@
|
|
|
|
#include "gui/ChoicePage.h"
|
|
|
|
#include "gui/ChoicePage.h"
|
|
|
|
#include "gui/AlongsidePage.h"
|
|
|
|
#include "gui/AlongsidePage.h"
|
|
|
|
#include "gui/PartitionPage.h"
|
|
|
|
#include "gui/PartitionPage.h"
|
|
|
|
#include "gui/ReplacePage.h"
|
|
|
|
|
|
|
|
#include "gui/PartitionPreview.h"
|
|
|
|
#include "gui/PartitionPreview.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "CalamaresVersion.h"
|
|
|
|
#include "CalamaresVersion.h"
|
|
|
@ -59,7 +58,6 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
|
|
|
, m_choicePage( nullptr )
|
|
|
|
, m_choicePage( nullptr )
|
|
|
|
, m_alongsidePage( new AlongsidePage() )
|
|
|
|
, m_alongsidePage( new AlongsidePage() )
|
|
|
|
, m_manualPartitionPage( new PartitionPage( m_core ) )
|
|
|
|
, m_manualPartitionPage( new PartitionPage( m_core ) )
|
|
|
|
, m_replacePage( new ReplacePage( m_core ) )
|
|
|
|
|
|
|
|
, m_compactMode( true )
|
|
|
|
, m_compactMode( true )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_widget->setContentsMargins( 0, 0, 0, 0 );
|
|
|
|
m_widget->setContentsMargins( 0, 0, 0, 0 );
|
|
|
@ -86,7 +84,6 @@ PartitionViewStep::continueLoading()
|
|
|
|
m_widget->addWidget( m_choicePage );
|
|
|
|
m_widget->addWidget( m_choicePage );
|
|
|
|
m_widget->addWidget( m_manualPartitionPage );
|
|
|
|
m_widget->addWidget( m_manualPartitionPage );
|
|
|
|
m_widget->addWidget( m_alongsidePage );
|
|
|
|
m_widget->addWidget( m_alongsidePage );
|
|
|
|
m_widget->addWidget( m_replacePage );
|
|
|
|
|
|
|
|
m_widget->removeWidget( m_waitingWidget );
|
|
|
|
m_widget->removeWidget( m_waitingWidget );
|
|
|
|
m_waitingWidget->deleteLater();
|
|
|
|
m_waitingWidget->deleteLater();
|
|
|
|
m_waitingWidget = nullptr;
|
|
|
|
m_waitingWidget = nullptr;
|
|
|
@ -97,8 +94,6 @@ PartitionViewStep::continueLoading()
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
connect( m_alongsidePage, &AlongsidePage::nextStatusChanged,
|
|
|
|
connect( m_alongsidePage, &AlongsidePage::nextStatusChanged,
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
connect( m_replacePage, &ReplacePage::nextStatusChanged,
|
|
|
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -270,9 +265,8 @@ PartitionViewStep::next()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( m_choicePage->currentChoice() == ChoicePage::Replace )
|
|
|
|
else if ( m_choicePage->currentChoice() == ChoicePage::Replace )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
emit done();
|
|
|
|
m_core->revert();
|
|
|
|
return;
|
|
|
|
m_widget->setCurrentWidget( m_replacePage );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cDebug() << "Choice applied: " << m_choicePage->currentChoice();
|
|
|
|
cDebug() << "Choice applied: " << m_choicePage->currentChoice();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -316,8 +310,7 @@ bool
|
|
|
|
PartitionViewStep::isAtBeginning() const
|
|
|
|
PartitionViewStep::isAtBeginning() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( m_widget->currentWidget() == m_manualPartitionPage ||
|
|
|
|
if ( m_widget->currentWidget() == m_manualPartitionPage ||
|
|
|
|
m_widget->currentWidget() == m_alongsidePage ||
|
|
|
|
m_widget->currentWidget() == m_alongsidePage )
|
|
|
|
m_widget->currentWidget() == m_replacePage )
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -340,9 +333,10 @@ void
|
|
|
|
PartitionViewStep::onActivate()
|
|
|
|
PartitionViewStep::onActivate()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// if we're coming back to PVS from the next VS
|
|
|
|
// if we're coming back to PVS from the next VS
|
|
|
|
if ( m_widget->currentWidget() == m_replacePage )
|
|
|
|
if ( m_widget->currentWidget() == m_choicePage )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_replacePage->reset();
|
|
|
|
// m_choicePage->reset();
|
|
|
|
|
|
|
|
//FIXME: ReplaceWidget should be reset maybe?
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -354,10 +348,6 @@ PartitionViewStep::onLeave()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_alongsidePage->applyChanges();
|
|
|
|
m_alongsidePage->applyChanges();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( m_widget->currentWidget() == m_replacePage )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m_replacePage->applyChanges();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|