mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
[partition] Be more verbose about why UI buttons appear
This commit is contained in:
parent
800f9d34f9
commit
b38316365e
1 changed files with 20 additions and 0 deletions
|
@ -1174,6 +1174,9 @@ ChoicePage::setupActions()
|
||||||
OsproberEntryList osproberEntriesForCurrentDevice =
|
OsproberEntryList osproberEntriesForCurrentDevice =
|
||||||
getOsproberEntriesForDevice( currentDevice );
|
getOsproberEntriesForDevice( currentDevice );
|
||||||
|
|
||||||
|
cDebug() << "Setting up actions for" << currentDevice->deviceNode()
|
||||||
|
<< "with" << osproberEntriesForCurrentDevice.count() << "entries.";
|
||||||
|
|
||||||
if ( currentDevice->partitionTable() )
|
if ( currentDevice->partitionTable() )
|
||||||
m_deviceInfoWidget->setPartitionTableType( currentDevice->partitionTable()->type() );
|
m_deviceInfoWidget->setPartitionTableType( currentDevice->partitionTable()->type() );
|
||||||
else
|
else
|
||||||
|
@ -1190,18 +1193,30 @@ ChoicePage::setupActions()
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef WITH_KPMCOREGT33
|
||||||
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
||||||
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
||||||
|
{
|
||||||
|
cDebug() << ".. part of an inactive RAID device";
|
||||||
isInactiveRAID = true;
|
isInactiveRAID = true;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for ( auto it = PartitionIterator::begin( currentDevice );
|
for ( auto it = PartitionIterator::begin( currentDevice );
|
||||||
it != PartitionIterator::end( currentDevice ); ++it )
|
it != PartitionIterator::end( currentDevice ); ++it )
|
||||||
{
|
{
|
||||||
if ( PartUtils::canBeResized( *it ) )
|
if ( PartUtils::canBeResized( *it ) )
|
||||||
|
{
|
||||||
|
cDebug() << ".. contains resizable" << it;
|
||||||
atLeastOneCanBeResized = true;
|
atLeastOneCanBeResized = true;
|
||||||
|
}
|
||||||
if ( PartUtils::canBeReplaced( *it ) )
|
if ( PartUtils::canBeReplaced( *it ) )
|
||||||
|
{
|
||||||
|
cDebug() << ".. contains replacable" << it;
|
||||||
atLeastOneCanBeReplaced = true;
|
atLeastOneCanBeReplaced = true;
|
||||||
|
}
|
||||||
if ( (*it)->isMounted() )
|
if ( (*it)->isMounted() )
|
||||||
|
{
|
||||||
|
cDebug() << ".. contains mounted" << it;
|
||||||
atLeastOneIsMounted = true;
|
atLeastOneIsMounted = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( osproberEntriesForCurrentDevice.count() == 0 )
|
if ( osproberEntriesForCurrentDevice.count() == 0 )
|
||||||
|
@ -1318,7 +1333,12 @@ ChoicePage::setupActions()
|
||||||
if ( !atLeastOneIsMounted && !isInactiveRAID )
|
if ( !atLeastOneIsMounted && !isInactiveRAID )
|
||||||
m_eraseButton->show(); // None mounted
|
m_eraseButton->show(); // None mounted
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
cDebug() << "Erase button suppressed"
|
||||||
|
<< "mount?" << atLeastOneIsMounted
|
||||||
|
<< "raid?" << isInactiveRAID;
|
||||||
force_uncheck( m_grp, m_eraseButton );
|
force_uncheck( m_grp, m_eraseButton );
|
||||||
|
}
|
||||||
|
|
||||||
bool isEfi = PartUtils::isEfiSystem();
|
bool isEfi = PartUtils::isEfiSystem();
|
||||||
bool efiSystemPartitionFound = !m_core->efiSystemPartitions().isEmpty();
|
bool efiSystemPartitionFound = !m_core->efiSystemPartitions().isEmpty();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue