Merge pull request #1524 from gportay/partition-message-user-if-no-option-available

[partition] Message user if no option available
This commit is contained in:
Adriaan de Groot 2020-10-07 01:32:13 +02:00 committed by GitHub
commit 9486ee6fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1430,6 +1430,23 @@ ChoicePage::setupActions()
m_alongsideButton->hide(); m_alongsideButton->hide();
m_replaceButton->hide(); m_replaceButton->hide();
} }
if ( m_somethingElseButton->isHidden()
&& m_alongsideButton->isHidden()
&& m_replaceButton->isHidden()
&& m_somethingElseButton->isHidden() )
{
if (atLeastOneIsMounted)
m_messageLabel->setText( tr( "This storage device has one of its partitions <strong>mounted</strong>." ) );
else
m_messageLabel->setText( tr( "This storage device is a part of an <strong>inactive RAID</strong> device." ) );
m_messageLabel->show();
cWarning() << "No buttons available"
<< "replaced?" << atLeastOneCanBeReplaced
<< "resized?" << atLeastOneCanBeResized
<< "erased? (not-mounted and not-raid)" << !atLeastOneIsMounted << "and" << !isInactiveRAID;
}
} }