|
|
|
@ -94,9 +94,35 @@ AlongsidePage::init( PartitionCoreModule* core , const OsproberEntryList& osprob
|
|
|
|
|
|
|
|
|
|
connect( m_partitionsComboBox,
|
|
|
|
|
static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ),
|
|
|
|
|
this, [ this ]( int index )
|
|
|
|
|
this, &AlongsidePage::onPartitionSelected );
|
|
|
|
|
|
|
|
|
|
connect( m_splitterWidget, &PartitionSplitterWidget::partitionResized,
|
|
|
|
|
this, [ this ]( const QString& path, qint64 size, qint64 sizeNext )
|
|
|
|
|
{
|
|
|
|
|
m_sizeLabel->setText( tr( "With this operation, the partition <strong>%1</strong> which contains "
|
|
|
|
|
"%4 will be shrunk "
|
|
|
|
|
"to %2MB and a new %3MB partition will be created for %5." )
|
|
|
|
|
.arg( path )
|
|
|
|
|
.arg( size / ( 1024 * 1024 ) )
|
|
|
|
|
.arg( sizeNext / ( 1024 * 1024 ) )
|
|
|
|
|
.arg( m_partitionsComboBox->currentText() )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductName ) ) );
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
foreach ( const OsproberEntry& e, osproberEntries )
|
|
|
|
|
{
|
|
|
|
|
QString path = m_partitionsComboBox->itemData( index ).toString();
|
|
|
|
|
if ( e.canBeResized )
|
|
|
|
|
m_partitionsComboBox->addItem( e.prettyName + " (" + e.path + ")", e.path );
|
|
|
|
|
}
|
|
|
|
|
setNextEnabled( true );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
AlongsidePage::onPartitionSelected( int comboBoxIndex )
|
|
|
|
|
{
|
|
|
|
|
QString path = m_partitionsComboBox->itemData( comboBoxIndex ).toString();
|
|
|
|
|
cDebug() << "Current index changed:" << path;
|
|
|
|
|
|
|
|
|
|
DeviceModel* dm = m_core->deviceModel();
|
|
|
|
@ -172,28 +198,6 @@ AlongsidePage::init( PartitionCoreModule* core , const OsproberEntryList& osprob
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
connect( m_splitterWidget, &PartitionSplitterWidget::partitionResized,
|
|
|
|
|
this, [ this ]( const QString& path, qint64 size, qint64 sizeNext )
|
|
|
|
|
{
|
|
|
|
|
m_sizeLabel->setText( tr( "With this operation, the partition <strong>%1</strong> which contains "
|
|
|
|
|
"%4 will be shrunk "
|
|
|
|
|
"to %2MB and a new %3MB partition will be created for %5." )
|
|
|
|
|
.arg( path )
|
|
|
|
|
.arg( size / ( 1024 * 1024 ) )
|
|
|
|
|
.arg( sizeNext / ( 1024 * 1024 ) )
|
|
|
|
|
.arg( m_partitionsComboBox->currentText() )
|
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
|
string( Calamares::Branding::ProductName ) ) );
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
foreach ( const OsproberEntry& e, osproberEntries )
|
|
|
|
|
{
|
|
|
|
|
if ( e.canBeResized )
|
|
|
|
|
m_partitionsComboBox->addItem( e.prettyName + " (" + e.path + ")", e.path );
|
|
|
|
|
}
|
|
|
|
|
setNextEnabled( true );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|