[packagechooser] Allow setting an ID for the module's GS key
This commit is contained in:
parent
2f2080727d
commit
87d7b2a5c0
@ -149,7 +149,6 @@ PackageChooserViewStep::jobs() const
|
|||||||
void
|
void
|
||||||
PackageChooserViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
PackageChooserViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||||
{
|
{
|
||||||
// TODO: use the configurationMap
|
|
||||||
QString mode = CalamaresUtils::getString( configurationMap, "mode" );
|
QString mode = CalamaresUtils::getString( configurationMap, "mode" );
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
if ( !mode.isEmpty() )
|
if ( !mode.isEmpty() )
|
||||||
@ -161,6 +160,9 @@ PackageChooserViewStep::setConfigurationMap( const QVariantMap& configurationMap
|
|||||||
m_mode = PackageChooserMode::Required;
|
m_mode = PackageChooserMode::Required;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_id = CalamaresUtils::getString( configurationMap, "id" );
|
||||||
|
|
||||||
|
// TODO: replace this hard-coded model
|
||||||
if ( !m_model )
|
if ( !m_model )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -60,7 +60,10 @@ private:
|
|||||||
|
|
||||||
PackageChooserPage* m_widget;
|
PackageChooserPage* m_widget;
|
||||||
PackageListModel* m_model;
|
PackageListModel* m_model;
|
||||||
|
|
||||||
|
// Configuration
|
||||||
PackageChooserMode m_mode;
|
PackageChooserMode m_mode;
|
||||||
|
QString m_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( PackageChooserViewStepFactory )
|
CALAMARES_PLUGIN_FACTORY_DECLARATION( PackageChooserViewStepFactory )
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
# Configuration for the low-density software chooser
|
# Configuration for the low-density software chooser
|
||||||
---
|
---
|
||||||
|
# The packagechooser writes a GlobalStorage value for the choice that
|
||||||
|
# has been made. The key is *packagechooser_<id>*. If *id* is set here,
|
||||||
|
# it is substituted into the key name. If it is not set, the module's
|
||||||
|
# instance name is used; see the *instances* section of `settings.conf`.
|
||||||
|
# If there is just one packagechooser module, and no *id* is set,
|
||||||
|
# resulting GS key is probably *packagechooser_packagechooser*.
|
||||||
|
#
|
||||||
|
# id: ""
|
||||||
|
|
||||||
# Software selection mode, to set whether the software packages
|
# Software selection mode, to set whether the software packages
|
||||||
# can be chosen singly, or multiply.
|
# can be chosen singly, or multiply.
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user