[packagechooser] Allow the model to set the introductory text

This commit is contained in:
Adriaan de Groot 2019-08-04 00:08:41 +02:00
parent 047a300a51
commit d5275d5e10
2 changed files with 29 additions and 2 deletions

View file

@ -144,7 +144,7 @@ PackageChooserViewStep::onLeave()
value = m_widget->selectedPackageIds().join( ',' );
}
Calamares::JobQueue::instance()->globalStorage()->insert( key, value );
cDebug() << "PackageChooser" << key << "selected" << value;
}
@ -180,8 +180,15 @@ PackageChooserViewStep::setConfigurationMap( const QVariantMap& configurationMap
// TODO: replace this hard-coded model
if ( !m_model )
{
m_model = new PackageListModel( nullptr );
m_model->addPackage( PackageItem { QString(),
QString(),
"No Desktop",
"Please pick a desktop environment from the list. "
"If you don't want to install a desktop, that's fine, "
"your system will start up in text-only mode and you can "
"install a desktop environment later.",
":/images/no-selection.png" } );
m_model->addPackage( PackageItem { "kde", "kde", "Plasma", "Plasma Desktop", ":/images/kde.png" } );
m_model->addPackage( PackageItem {
"gnome", "gnome", "GNOME", "GNU Networked Object Modeling Environment Desktop", ":/images/gnome.png" } );