From 6bccbcd1f5bd35992779750f9db74df366d539ac Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 4 Apr 2019 17:37:37 +0200 Subject: [PATCH] [partition] Improve logging of status of choice buttons --- src/modules/partition/gui/ChoicePage.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 446d26a89..504fbcd81 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -1228,7 +1228,7 @@ ChoicePage::setupActions() if ( currentDevice->type() == Device::Type::SoftwareRAID_Device && static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive ) { - cDebug() << ".. part of an inactive RAID device"; + cDebug() << Logger::SubEntry() << "part of an inactive RAID device"; isInactiveRAID = true; } #endif @@ -1238,17 +1238,17 @@ ChoicePage::setupActions() { if ( PartUtils::canBeResized( *it ) ) { - cDebug() << ".. contains resizable" << it; + cDebug() << Logger::SubEntry() << "contains resizable" << it; atLeastOneCanBeResized = true; } if ( PartUtils::canBeReplaced( *it ) ) { - cDebug() << ".. contains replaceable" << it; + cDebug() << Logger::SubEntry() << "contains replaceable" << it; atLeastOneCanBeReplaced = true; } if ( (*it)->isMounted() ) { - cDebug() << ".. contains mounted" << it; + cDebug() << Logger::SubEntry() << "contains mounted (un-eraseable)" << it; atLeastOneIsMounted = true; } } @@ -1372,12 +1372,18 @@ ChoicePage::setupActions() if ( atLeastOneCanBeReplaced ) m_replaceButton->show(); else + { + cDebug() << "Replace button suppressed because none can be replaced."; force_uncheck( m_grp, m_replaceButton ); + } if ( atLeastOneCanBeResized ) m_alongsideButton->show(); else + { + cDebug() << "Alongside button suppressed because none can be resized."; force_uncheck( m_grp, m_alongsideButton ); + } if ( !atLeastOneIsMounted && !isInactiveRAID ) m_eraseButton->show(); // None mounted