|
|
|
@ -165,12 +165,11 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|
|
|
|
bool showAll( false );
|
|
|
|
|
if ( configurationMap.contains( "showAll" ) && configurationMap.value( "showAll" ).type() == QVariant::Bool )
|
|
|
|
|
showAll = configurationMap.value( "showAll" ).toBool();
|
|
|
|
|
m_widget->setShowAll( showAll );
|
|
|
|
|
|
|
|
|
|
if ( configurationMap.contains( "themes" ) &&
|
|
|
|
|
configurationMap.value( "themes" ).type() == QVariant::List )
|
|
|
|
|
{
|
|
|
|
|
ThemeInfoList allThemes;
|
|
|
|
|
ThemeInfoList listedThemes;
|
|
|
|
|
auto themeList = configurationMap.value( "themes" ).toList();
|
|
|
|
|
// Create the ThemInfo objects for the listed themes; information
|
|
|
|
|
// about the themes from Plasma (e.g. human-readable name and description)
|
|
|
|
@ -179,14 +178,14 @@ PlasmaLnfViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|
|
|
|
if ( i.type() == QVariant::Map )
|
|
|
|
|
{
|
|
|
|
|
auto iv = i.toMap();
|
|
|
|
|
allThemes.append( ThemeInfo( iv.value( "theme" ).toString(), iv.value( "image" ).toString() ) );
|
|
|
|
|
listedThemes.append( ThemeInfo( iv.value( "theme" ).toString(), iv.value( "image" ).toString() ) );
|
|
|
|
|
}
|
|
|
|
|
else if ( i.type() == QVariant::String )
|
|
|
|
|
allThemes.append( ThemeInfo( i.toString() ) );
|
|
|
|
|
listedThemes.append( ThemeInfo( i.toString() ) );
|
|
|
|
|
|
|
|
|
|
if ( allThemes.length() == 1 )
|
|
|
|
|
if ( listedThemes.length() == 1 )
|
|
|
|
|
cDebug() << "WARNING: only one theme enabled in plasmalnf";
|
|
|
|
|
m_widget->setEnabledThemes( allThemes );
|
|
|
|
|
m_widget->setEnabledThemes( listedThemes, showAll );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
m_widget->setEnabledThemesAll(); // All of them
|
|
|
|
|